CertSafari

    Free Palantir Foundry Data Engineer Certification Sample Questions

    35 free sample questions from our bank of 350+, covering every exam domain, with answers and detailed explanations. Updated August 2026.

    Domain 1: DATA PIPELINE DEVELOPMENT IN FOUNDRY

    Subdomain 1.3: Configure pipeline for production use

    1.Scenario: An upstream team adds a new column to their dataset. Your production pipeline, which uses `df.select("*")`, processes this dataset and writes to an output. Downstream pipelines suddenly fail because they do not expect the new column. How should you prevent this schema evolution issue in the future?

    1. A.Enable automatic schema inference on all downstream datasets.
    2. B.Explicitly define and select only the required columns in your transform.
    3. C.Use a dynamic schema registry to automatically update downstream code.
    4. D.Configure a Data Health check to fail if the column count changes.
    Show answer & explanation

    Correct answer: BExplicitly define and select only the required columns in your transform.

    • A. Automatic schema inference makes pipelines more permissive but facilitates the propagation of unexpected schema changes. In this scenario, it would allow the new column to flow through to all downstream datasets, potentially causing failures across the entire graph instead of isolating the change.
    • B. Explicitly selecting only the columns required for your logic creates a stable schema contract. By avoiding `select("*")`, you ensure that upstream schema drift (like adding new columns) does not affect your output, protecting downstream consumers from unexpected changes.
    • C. Dynamic schema registries are not a standard or recommended pattern in Foundry for isolating schema changes. Automatically updating downstream code is inherently risky, introduces tight coupling, and often leads to broken transformations that rely on specific column counts or names.
    • D. While a Schema Data Health check can alert you to changes in column count, it is a reactive measure. It does not prevent the new column from being written to the dataset, nor does it resolve the underlying issue of an unstable schema contract in the transformation code.

    Subdomain 1.3: Configure pipeline for production use

    2.Scenario: You need to develop and test a complex new feature for a production pipeline without disrupting the `master` branch or duplicating the entire upstream data lineage. Which Foundry feature best supports this workflow?

    1. A.Create a new repository and copy the code.
    2. B.Branch the repository and rely on dataset fallback to read upstream data.
    3. C.Edit the code directly on master but disable the build schedule.
    4. D.Export the data to your local machine and test using a local Spark installation.
    Show answer & explanation

    Correct answer: BBranch the repository and rely on dataset fallback to read upstream data.

    • A. Creating a new repository and copying code is inefficient as it requires manual synchronization and duplicates the upstream lineage, contradicting the scenario's requirement to avoid duplication and increase maintenance overhead.
    • B. Branching the repository allows for isolated feature development without affecting the production master branch. Dataset fallback is the specific Foundry mechanism that enables reading from existing upstream data on the parent branch without needing to rebuild or duplicate those datasets on the new branch.
    • C. Modifying code directly on master is a high-risk practice that can break production pipelines. Even with schedules disabled, it provides no isolation for testing and disrupts the integrity of the production codebase.
    • D. Exporting data for local testing bypasses Foundry’s integrated environment, fails to preserve lineage, and can lead to environment parity issues. It is not a scalable or Foundry-native solution for production pipeline development.

    Subdomain 1.4: Apply general best practices during pipeline development

    3.You are optimizing a slow PySpark pipeline that parses a dataset containing a column of deeply nested JSON strings. The current implementation uses `spark.read.json(df.rdd.map(lambda r: r.json_col))`. Which TWO of the following are best practices to improve the performance of this parsing operation?(Select 2)

    1. A.Use the `from_json` PySpark SQL function instead of RDD operations.
    2. B.Provide an explicit PySpark `StructType` schema to `from_json` to avoid the overhead of schema inference.
    3. C.Increase the driver memory to allow schema inference to run faster.
    4. D.Convert the DataFrame to Pandas, use `json.loads`, and convert back to PySpark.
    5. E.Use `F.explode` on the JSON string before parsing it.
    Show answer & explanation

    Correct answers: A, BUse the `from_json` PySpark SQL function instead of RDD operations.; Provide an explicit PySpark `StructType` schema to `from_json` to avoid the overhead of schema inference.

    • A. Correct. Using the `from_json` PySpark SQL function is significantly more efficient than RDD-based operations. It operates directly on DataFrame columns, avoiding the expensive serialization/deserialization overhead of moving data between Python and the JVM associated with RDD transitions, and allows Spark's Catalyst optimizer to handle the execution plan.
    • B. Correct. Providing an explicit `StructType` schema to `from_json` eliminates the need for Spark to perform schema inference. Inference requires at least one extra pass over the data to determine the structure, which is computationally expensive and slow for large or deeply nested datasets.
    • C. Incorrect. Increasing driver memory might mask resource limitations or prevent Out Of Memory (OOM) errors during heavy operations, but it does not address the architectural inefficiency of using RDDs or the CPU-bound nature of schema inference.
    • D. Incorrect. Converting to Pandas moves data from a distributed Spark environment to a single-node memory space (the driver). This is not scalable for large datasets and introduces massive overhead due to data movement and the loss of Spark's distributed processing capabilities.
    • E. Incorrect. The `explode` function is used to transform a column of arrays or maps into multiple rows. It cannot be applied to a raw JSON string to facilitate parsing and is not relevant to improving the initial parsing performance.

    Subdomain 1.4: Apply general best practices during pipeline development

    4.To ensure high data quality in a production pipeline, you want to implement automated checks that monitor data quality or fail the build if certain conditions are not met. Which THREE of the following are recommended Foundry best practices or tools for this?(Select 3)

    1. A.Using Pipeline Builder's built-in data expectations and validation rules.
    2. B.Configuring Data Health checks on the output dataset to monitor metrics and alert on anomalies.
    3. C.Writing custom PySpark assertions in the transform code that raise an exception if data is invalid.
    4. D.Manually reviewing the Dataset Preview after every build before releasing the data.
    5. E.Exporting the data to an external BI tool to run daily quality reports.
    Show answer & explanation

    Correct answers: A, B, CUsing Pipeline Builder's built-in data expectations and validation rules.; Configuring Data Health checks on the output dataset to monitor metrics and alert on anomalies.; Writing custom PySpark assertions in the transform code that raise an exception if data is invalid.

    • A. Pipeline Builder supports built-in data expectations and validation rules that automatically enforce quality conditions during pipeline execution. These checks are designed to catch bad data early and can be configured to fail the build when expectations are violated.
    • B. Data Health checks are a Foundry-native tool used to monitor metrics, track data freshness, and detect anomalies over time. They provide automated alerting and operational oversight, making them a standard best practice for production pipelines.
    • C. In Code Repositories, writing custom assertions (e.g., using PySpark or Java) can enforce strict data quality constraints. If the assertion fails and raises an exception, the build process stops, preventing invalid data from propagating to downstream datasets.
    • D. Manual review is not an automated process and does not scale for production environments. While useful during development, it cannot reliably monitor quality or fail builds automatically in a production schedule.
    • E. Exporting data to external tools for quality reporting introduces unnecessary latency and complexity. Foundry provides native, integrated tools (like Data Health and Expectations) that allow for real-time monitoring and gating within the platform.

    Subdomain 1.1: Process tabular data in Transforms

    5.You need to extract text from thousands of PDF files stored in a Foundry unstructured dataset. You want to parallelize this extraction using PySpark to minimize processing time. Which approach is recommended in Foundry?

    1. A.Use FoundryFS on the Spark driver node to download all PDFs, extract the text sequentially, and parallelize the resulting list.
    2. B.Use Pipeline Builder's native PDF extraction node, as Code Repositories do not support unstructured data.
    3. C.Create a Spark DataFrame containing the file paths, and use a Pandas UDF to open each file via FoundryFS and extract the text on the executors.
    4. D.Convert the PDFs to CSV format locally on your machine before uploading them to Foundry.
    Show answer & explanation

    Correct answer: CCreate a Spark DataFrame containing the file paths, and use a Pandas UDF to open each file via FoundryFS and extract the text on the executors.

    • A. Pulling all files to the Spark driver node creates a severe bottleneck and defeats the purpose of parallel execution. This approach increases driver memory pressure and is likely to result in Out-of-Memory (OOM) errors when handling thousands of files.
    • B. This statement is incorrect because Code Repositories fully support unstructured data through the `filesystem` API. While Pipeline Builder has many capabilities, the assertion that Code Repos cannot handle unstructured data is false.
    • C. This is the standard Foundry pattern for parallelizing unstructured data processing. By creating a DataFrame of file paths, you can use a Pandas UDF to distribute the extraction logic across multiple executors. Each executor uses the filesystem/FoundryFS API to access the specific files assigned to it, significantly reducing total processing time.
    • D. Manual local conversion is not scalable, repeatable, or integrated into Foundry's data lineage. This approach prevents parallel processing within the platform and is impractical for large-scale production pipelines.

    Subdomain 1.1: Process tabular data in Transforms

    6.You are processing an unstructured dataset containing images. You need to resize the images and save them to a new unstructured dataset. How do you write the processed binary image data back to Foundry within a transform?

    1. A.Use `output.write_dataframe()` with a DataFrame containing the binary image data.
    2. B.Use `output.get_file_system().open(filename, 'w')` within the transform to write the bytes directly to the output dataset.
    3. C.Save the images to the Spark driver's local disk and use `spark.write.format("image")`.
    4. D.Use the `@transform_df` decorator and return a Pandas DataFrame containing the images.
    Show answer & explanation

    Correct answer: BUse `output.get_file_system().open(filename, 'w')` within the transform to write the bytes directly to the output dataset.

    • A. Incorrect. `output.write_dataframe()` is specifically designed for writing structured tabular data (Spark DataFrames) to Foundry. It cannot be used to directly write raw binary bytes into an unstructured dataset.
    • B. Correct. For unstructured outputs in Foundry transforms, you use the `output.get_file_system()` method. This returns a filesystem object that allows you to open file handles (e.g., using `.open(filename, 'wb')`) to write binary data or bytes directly to the output dataset.
    • C. Incorrect. The Spark driver's local disk is ephemeral and is not a valid persistence layer for Foundry datasets. Additionally, `spark.write.format("image")` is intended for reading/writing structured DataFrames with image schemas, rather than persisting raw files to an unstructured dataset.
    • D. Incorrect. The `@transform_df` decorator is used for transforms that expect and return tabular DataFrames (Spark or Pandas). It does not support writing to the filesystem of an unstructured dataset.

    Subdomain 1.1: Process tabular data in Transforms

    7.A PySpark job is experiencing severe data skew during a `groupBy` aggregation, causing a few tasks to process the majority of the data. Which of the following techniques can help mitigate this issue?(Select 3)

    1. A.Salting the group-by key to distribute the skewed data across multiple partitions.
    2. B.Performing a two-stage aggregation (local aggregation followed by a global aggregation).
    3. C.Increasing the `spark.sql.shuffle.partitions` configuration to increase parallelism.
    4. D.Broadcasting the large dataset to all executors.
    5. E.Using `coalesce(1)` before the aggregation to ensure all data is on one node.
    Show answer & explanation

    Correct answers: A, B, CSalting the group-by key to distribute the skewed data across multiple partitions.; Performing a two-stage aggregation (local aggregation followed by a global aggregation).; Increasing the `spark.sql.shuffle.partitions` configuration to increase parallelism.

    • A. Correct. Salting involves adding a random prefix or suffix (salt) to the group-by key, effectively splitting a 'hot' key into multiple pseudo-keys. This ensures records for that key are distributed across more partitions, reducing the likelihood of a single task becoming a straggler.
    • B. Correct. A two-stage aggregation (also known as partial aggregation) performs an initial aggregation on smaller subsets of data (often by adding a salt) before performing the final global aggregation. This significantly reduces the volume of data shuffled across the network and balances the final processing load.
    • C. Correct. Increasing `spark.sql.shuffle.partitions` increases the number of tasks in the shuffle stage. While it may not solve extreme skew for a single key, it improves overall parallelism and prevents multiple large keys from clustering into the same partition.
    • D. Incorrect. Broadcasting is a technique used during joins to send a small table to all executors to avoid a shuffle. It is not a solution for data skew during a `groupBy` aggregation on a large dataset.
    • E. Incorrect. Using `coalesce(1)` collapses all data into a single partition on a single node. This eliminates parallelism entirely and would exacerbate the bottleneck, likely leading to an OutOfMemory (OOM) error.

    Subdomain 1.2: Process unstructured data in Transforms

    8.You need to run an expensive OCR process on 100,000 PDF files stored in a Foundry unstructured dataset. Processing them in a standard `for` loop on the driver node takes too long. What is the best practice to parallelize this workload?

    1. A.Increase the driver node memory to 128GB and use a standard Python `for` loop with the `FileSystem` API.
    2. B.Create a PySpark DataFrame containing the Hadoop paths of the files, then apply a Pandas UDF that uses standard Python libraries to read the files directly from the distributed file system on the executor nodes.
    3. C.Use the `@parallel` decorator on the transform function to automatically distribute the `FileSystem` API calls.
    4. D.Convert the PDFs to CSVs using the Foundry Data Connection UI before processing.
    Show answer & explanation

    Correct answer: BCreate a PySpark DataFrame containing the Hadoop paths of the files, then apply a Pandas UDF that uses standard Python libraries to read the files directly from the distributed file system on the executor nodes.

    • A. Increasing the driver node memory (vertical scaling) does not address the issue of parallelization. A standard Python loop on the driver node executes tasks sequentially; therefore, the OCR processing remains serial and inefficient for a large volume of files.
    • B. The standard architectural pattern in Foundry for scaling unstructured data processing is to distribute the file metadata (like Hadoop paths) into a PySpark DataFrame. By applying a Pandas UDF, Spark distributes the work across multiple executor nodes, each of which can independently fetch and process files in parallel using standard Python OCR libraries.
    • C. Foundry's Transform API does not feature a `@parallel` decorator for the automatic distribution of FileSystem API calls. Parallelization must be managed explicitly by leveraging Spark's distributed computing framework.
    • D. Converting PDFs to CSVs via the Data Connection UI is not a supported method for performing OCR, nor does it address the requirement to distribute a compute-intensive workload across a cluster.

    Subdomain 1.2: Process unstructured data in Transforms

    9.You are reading thousands of small JSON files. Some files are malformed and cause the `json.loads()` function to throw an exception, failing the entire build. What is the most robust way to handle this?

    1. A.Wrap the `json.loads()` call in a `try-except` block, log the error or write the failed file path to a dead-letter queue, and continue processing the remaining files.
    2. B.Use `spark.read.json()` with the `mode="FAILFAST"` option.
    3. C.Manually inspect and fix the malformed JSON files in the Code Repository before running the build.
    4. D.Use the `@ignore_errors` decorator on the transform function.
    Show answer & explanation

    Correct answer: AWrap the `json.loads()` call in a `try-except` block, log the error or write the failed file path to a dead-letter queue, and continue processing the remaining files.

    • A. Correct. Wrapping the `json.loads()` call in a `try-except` block allows for graceful error handling at the individual file level. This prevents a single bad file from crashing the entire transform job. Tracking failed records or file paths in a 'dead-letter' structure provides visibility into data quality issues while ensuring valid files are successfully processed.
    • B. Incorrect. The `FAILFAST` mode in Spark's JSON reader causes the entire task to fail immediately as soon as a malformed record is encountered. This is the least robust approach if the goal is to tolerate and skip individual file errors.
    • C. Incorrect. Manually fixing files is not scalable for thousands of files and does not provide a resilient runtime strategy. Furthermore, input data exists in datasets, not the Code Repository, so this approach is practically impossible for dynamic data streams.
    • D. Incorrect. There is no standard `@ignore_errors` decorator in Python or the Palantir Foundry Transforms API for handling per-file JSON parsing failures within a function.

    Domain 2: DATA PIPELINE MAINTENANCE IN FOUNDRY

    Subdomain 2.2: Contribute changes to a production pipeline

    10.A production PySpark transform fails with `java.lang.OutOfMemoryError: Java heap space` during a complex aggregation. The data volume has grown by 30% recently. Which configuration change is the most appropriate first step to resolve this without altering the logic?

    1. A.Increase `spark.executor.memory` in the transform's profile.
    2. B.Increase `spark.driver.memory` in the transform's profile.
    3. C.Set `spark.sql.shuffle.partitions` to a lower number.
    4. D.Enable `spark.dynamicAllocation.enabled`.
    Show answer & explanation

    Correct answer: AIncrease `spark.executor.memory` in the transform's profile.

    • A. Correct. Increasing `spark.executor.memory` provides more heap space to the executors, which are responsible for the actual data processing tasks. Since the failure occurs during a complex aggregation and the data volume has increased, giving the worker nodes more memory to handle larger partitions is the most direct fix without changing the code.
    • B. Incorrect. `spark.driver.memory` allocates memory to the driver node, which coordinates tasks and manages the execution plan. Aggregations are distributed tasks performed by executors; the driver is typically only an issue if using `.collect()` or handling a massive number of small tasks.
    • C. Incorrect. Lowering the number of shuffle partitions increases the amount of data each partition must process. This results in larger data chunks being loaded into executor memory at once, which would likely worsen the heap space issue.
    • D. Incorrect. Dynamic allocation changes the quantity of executors based on workload, but it does not change the memory resources available to each individual executor. If a task is too large for the current executor memory profile, adding more executors of the same size will not prevent the OOM error.

    Subdomain 2.1: Debug an issue in a production pipeline

    11.A pipeline fails with the error: `Could not execute broadcast in 300 secs`. The transform joins a 500GB dataset with a 2GB dataset. What is the most robust way to fix this issue without causing out-of-memory errors?

    1. A.Increase `spark.sql.broadcastTimeout` to 3600 seconds.
    2. B.Disable broadcast joins by setting `spark.sql.autoBroadcastJoinThreshold` to -1 or using a hint to force a SortMergeJoin.
    3. C.Cache the 500GB dataset before performing the join.
    4. D.Repartition the 2GB dataset into 10,000 partitions.
    Show answer & explanation

    Correct answer: BDisable broadcast joins by setting `spark.sql.autoBroadcastJoinThreshold` to -1 or using a hint to force a SortMergeJoin.

    • A. Increasing the broadcast timeout may bypass the immediate error, but it does not address the underlying architectural risk. Broadcasting a 2GB table can still exhaust executor memory or cause driver-side overhead, making it an unstable solution for production pipelines.
    • B. This is the most robust solution. Disabling broadcast joins or forcing a SortMergeJoin avoids the attempt to ship the 2GB table to every executor. While a shuffle-based join (SortMergeJoin) involves higher I/O, it is significantly more stable for datasets of this size and eliminates the specific timeout and memory risks associated with broadcasting large tables.
    • C. Caching a 500GB dataset is impractical and likely to cause immediate OOM errors or spill to disk heavily, as it is far too large for executor memory. Furthermore, it does nothing to resolve the broadcast join strategy bottleneck.
    • D. Repartitioning the 2GB dataset into 10,000 partitions creates 'small file' problems and excessive shuffle metadata overhead. It does not disable the broadcast mechanism, so the underlying timeout issue would persist if Spark still attempts to broadcast the table.

    Subdomain 2.2: Contribute changes to a production pipeline

    12.You are establishing a support structure for a new mission-critical pipeline. You want to be alerted immediately if the pipeline produces data that violates business rules (e.g., negative revenue). Which Foundry feature should you configure?

    1. A.A Schedule with a 'Fail on Error' trigger.
    2. B.A Data Health check on the output dataset with a configured notification.
    3. C.A Code Repository CI check.
    4. D.A Spark UI alert.
    Show answer & explanation

    Correct answer: BA Data Health check on the output dataset with a configured notification.

    • A. A schedule with a 'fail-on-error' trigger is focused on job execution failures (e.g., code crashes or infrastructure issues). It does not inherently validate the contents of the produced data against business rules unless the pipeline code is explicitly designed to raise a fatal error upon detecting such conditions.
    • B. Data Health checks are the standard Foundry feature for validating data quality and integrity. They allow users to define specific business rules (like range checks or null checks) on the output dataset and configure notifications to alert stakeholders immediately if those thresholds are breached.
    • C. Code Repository CI checks validate the code itself (e.g., unit tests, linting, and build success) during the development and merge process. They do not monitor the actual data records generated during runtime in the production environment.
    • D. The Spark UI is utilized for debugging job performance, examining task execution, and monitoring resource allocation. It is not a tool for business rule validation or automated data quality alerting.

    Subdomain 2.2: Contribute changes to a production pipeline

    13.What is the recommended Foundry tool for tracking, routing, and managing data pipeline issues and feature requests across different data engineering teams?

    1. A.Data Lineage
    2. B.Issue App (or Issues in Foundry)
    3. C.Object Explorer
    4. D.Code Workspaces
    Show answer & explanation

    Correct answer: BIssue App (or Issues in Foundry)

    • A. Data Lineage provides a visual representation of how data flows through pipelines and the dependencies between datasets. While helpful for debugging and understanding the context of an error, it is not the primary tool for managing cross-team issue intake or feature request routing.
    • B. The Issues application in Foundry is the purpose-built tool for tracking, routing, and managing data pipeline issues and feature requests. It provides centralized workflows for triage, ownership assignments, and collaboration across multiple data engineering teams, ensuring operational visibility.
    • C. Object Explorer is a tool used for browsing, discovering, and inspecting Foundry objects and their associated metadata. It is designed for data discovery and analysis rather than project management or issue tracking.
    • D. Code Workspaces are development environments used for writing, editing, and testing code within Foundry. While they are where developers might implement a fix, the actual management and tracking of the underlying issue or feature request are handled by the Issues application.

    Subdomain 2.1: Debug an issue in a production pipeline

    14.In the Spark UI, which tab is most useful for identifying if a specific stage is suffering from data skew by showing the distribution of task durations and shuffle read sizes?

    1. A.Environment
    2. B.Storage
    3. C.Stages
    4. D.SQL
    Show answer & explanation

    Correct answer: CStages

    • A. The Environment tab displays Spark configuration properties, system properties, and environment variables. It is useful for verifying settings but does not provide execution metrics like task durations or shuffle data distributions.
    • B. The Storage tab provides information about cached RDDs, DataFrames, and Datasets, including their memory and disk usage. It is not used to analyze the execution performance or distribution of individual tasks.
    • C. The Stages tab provides granular details for each stage of execution. It includes a 'Summary Metrics' table showing the distribution (Min, 25th percentile, Median, 75th percentile, Max) of task durations and shuffle read sizes. Significant discrepancies between the Median/75th percentile and the Max values are clear indicators of data skew.
    • D. The SQL tab displays details of Spark SQL queries, including their physical plans and overall execution status. While it can link to specific stages, it does not directly provide the task-level distribution metrics required to identify skew; those are found within the Stages tab.

    Subdomain 2.1: Debug an issue in a production pipeline

    15.A scheduled build is consistently failing to meet its SLA, taking 4 hours instead of the expected 1 hour. Which actions are appropriate to diagnose and resolve this performance degradation?(Select 3)

    1. A.Analyze the Spark UI to identify bottlenecks, such as long-running stages or skewed tasks.
    2. B.Check the Job Tracker to see if the job is experiencing hidden retries due to spot instance preemption or executor loss.
    3. C.Immediately double the driver memory profile.
    4. D.Review recent code changes in the repository to see if a computationally expensive operation (like an explosion or complex regex) was introduced.
    5. E.Disable all Data Health checks on the pipeline to speed up the build.
    Show answer & explanation

    Correct answers: A, B, DAnalyze the Spark UI to identify bottlenecks, such as long-running stages or skewed tasks.; Check the Job Tracker to see if the job is experiencing hidden retries due to spot instance preemption or executor loss.; Review recent code changes in the repository to see if a computationally expensive operation (like an explosion or complex regex) was introduced.

    • A. Correct. The Spark UI is the primary diagnostic tool for identifying performance issues. It provides granular details on stage timing, task distribution, shuffle volumes, and execution plans, allowing engineers to pinpoint data skew or inefficient join/aggregation patterns.
    • B. Correct. The Job Tracker allows you to see the history of the build. Infrastructure instability, such as frequent executor loss or spot instance preemption, can cause tasks to be retried multiple times, significantly extending the wall-clock runtime of a job without causing it to fail outright.
    • C. Incorrect. Arbitrarily increasing driver memory is a reactive measure usually intended to resolve OutOfMemory (OOM) errors, not general performance degradation. Without evidence from Spark logs that the driver is the bottleneck, this step is speculative and unlikely to resolve a 4x runtime regression.
    • D. Correct. Reviewing the repository's history is a standard practice in regression analysis. Identifying if a recent code change introduced computationally expensive logic—such as a large join, a data 'explosion' via flatMap, or complex regex—can help correlate the performance drop with a specific update.
    • E. Incorrect. Disabling Data Health checks is not a valid performance optimization strategy. These checks ensure the integrity and quality of the production data. Removing them bypasses necessary validation and does not address the underlying performance issues of the Spark transformations.

    Subdomain 2.3: Set up support structure for production pipeline

    16.Your PySpark transform fails with a `Task not serializable` error. You are using a custom Python class to format strings within a UDF. How should you fix this issue?

    1. A.Increase the `spark.driver.memory` configuration in the transform profile.
    2. B.Instantiate the custom Python class inside the UDF or map function rather than at the driver level.
    3. C.Convert the custom Python class into a Pandas DataFrame and broadcast it.
    4. D.Switch the transform from PySpark to Spark SQL.
    Show answer & explanation

    Correct answer: BInstantiate the custom Python class inside the UDF or map function rather than at the driver level.

    • A. Increasing `spark.driver.memory` provides more memory to the driver node, which helps with large result sets or high-memory driver processes but does not address serialization. The `Task not serializable` error occurs when Spark attempts to pickle an object in the function closure to send to workers, which is a logic/scoping issue rather than a memory capacity issue.
    • B. This is the correct solution. By instantiating the custom Python class inside the UDF or map function, the object is created locally on each executor node rather than being captured from the driver's scope. This prevents Spark from attempting to serialize the driver-side instance of the class to send over the network, which is the root cause of the error.
    • C. A custom Python class cannot be converted into a Pandas DataFrame as a fix for serialization errors. Broadcasting is intended for distributing small, immutable data structures efficiently across nodes to optimize joins; it is not a mechanism for making arbitrary non-serializable code or class logic compatible with Spark execution.
    • D. While switching to Spark SQL might avoid some Python UDF-specific serialization pitfalls by using Spark's internal expressions, it is not a direct fix for the Python code provided. The specific problem is the closure capture of a non-serializable object, which is properly fixed by managing the scope of the class instantiation within the PySpark API.

    Subdomain 2.3: Set up support structure for production pipeline

    17.An incremental transform runs every 15 minutes. Over time, downstream jobs reading this dataset have become significantly slower, though the total data volume hasn't increased much. What is the most likely cause and solution?

    1. A.The dataset is suffering from data skew; implement salting.
    2. B.The dataset has accumulated too many small files; implement a compaction strategy or repartition the output.
    3. C.The driver memory is exhausted; increase spark.driver.memory.
    4. D.The upstream schedule is failing; check the Data Health inbox.
    Show answer & explanation

    Correct answer: BThe dataset has accumulated too many small files; implement a compaction strategy or repartition the output.

    • A. Data skew typically causes uneven distribution of data across partitions, leading to specific tasks taking much longer than others. However, it does not explain a gradual read performance degradation for downstream jobs when total volume is stable; that symptom is characteristic of file fragmentation.
    • B. This is a classic 'small file problem' in Foundry. Frequent incremental runs (e.g., every 15 minutes) create many small files. As files accumulate, downstream Spark jobs must spend significant time listing, opening, and processing metadata for thousands of files. A compaction strategy (e.g., a periodic snapshot run or a re-write) consolidates these into larger, more efficient files.
    • C. Driver memory exhaustion usually results in job crashes, OutOfMemory (OOM) errors, or extreme garbage collection pauses during execution. It would not manifest as a progressive slowdown in read performance for downstream jobs over an extended period.
    • D. Upstream schedule failures would result in stale data, missing output, or job failure alerts in Data Health. It would not directly cause downstream jobs to take longer to read the existing physical files in the dataset.

    Subdomain 2.4: Improve performance of production pipeline

    18.You are optimizing a mission-critical pipeline where a massive `sensor_readings` dataset (8TB) is joined with a `sensor_metadata` dataset (25MB). The current SortMergeJoin takes 45 minutes due to heavy shuffling. Which logic change will yield the most significant performance improvement?

    1. A.Bucket both datasets by `sensor_id` into 1000 buckets to eliminate the shuffle phase.
    2. B.Wrap the `sensor_metadata` dataframe in `pyspark.sql.functions.broadcast()` to force a Broadcast Hash Join.
    3. C.Cache the `sensor_readings` dataset in memory before performing the join.
    4. D.Increase `spark.sql.autoBroadcastJoinThreshold` to 10MB to automatically broadcast the metadata.
    Show answer & explanation

    Correct answer: BWrap the `sensor_metadata` dataframe in `pyspark.sql.functions.broadcast()` to force a Broadcast Hash Join.

    • A. Bucketing both datasets requires a complete rewrite of the data to disk. For an 8TB dataset, this is a massive overhead and usually less efficient than a Broadcast Join when one side is small. While bucketing can reduce shuffle in specific scenarios, it is not the most direct or impactful logic change here.
    • B. This is the optimal solution. Broadcasting the 25MB `sensor_metadata` dataset allows Spark to perform a Broadcast Hash Join. This sends the small dataset to every executor, completely eliminating the need to shuffle the 8TB `sensor_readings` dataset, which is the primary cause of the 45-minute delay.
    • C. Caching an 8TB dataset is impractical as it likely exceeds the cluster's available RAM and disk cache capacity. Furthermore, caching does not address the fundamental performance bottleneck, which is the expensive shuffle and sort phases required by a SortMergeJoin.
    • D. Increasing the `spark.sql.autoBroadcastJoinThreshold` to 10MB would not affect this join because the `sensor_metadata` dataset is 25MB, exceeding that threshold. Explicitly broadcasting the dataframe (as in Option B) is more predictable and effective for a dataset of this size.

    Subdomain 2.4: Improve performance of production pipeline

    19.A massive production dataset is queried thousands of times a day by downstream applications. Almost all queries filter on `region_id` and `transaction_date`. Currently, queries scan the entire dataset, resulting in poor performance. Which maintenance action should you perform on the dataset to improve read performance?

    1. A.Apply Z-Ordering (multi-dimensional clustering) on `region_id` and `transaction_date` to optimize file skipping.
    2. B.Repartition the dataset by a randomly generated UUID to ensure perfectly even file sizes.
    3. C.Convert the dataset format to Avro, as it is optimized for heavy read filtering.
    4. D.Cache the entire dataset in the Foundry caching layer using a scheduled build.
    Show answer & explanation

    Correct answer: AApply Z-Ordering (multi-dimensional clustering) on `region_id` and `transaction_date` to optimize file skipping.

    • A. Z-Ordering clusters data based on specified columns, co-locating related values. This allows the query engine to utilize file skipping (predicate pushdown), as it can skip reading files that do not contain the relevant range of data for the `region_id` and `transaction_date` filters, significantly reducing I/O.
    • B. Repartitioning by a random UUID ensures even distribution of records across files to prevent data skew, but it provides no optimization for filtered queries. Since relevant rows would be scattered across all files, the engine would still be forced to perform a full scan.
    • C. Avro is a row-oriented storage format typically used for write-heavy workloads or serialization. Columnar formats like Parquet (the Foundry default) are significantly better for analytical workloads that involve selective filtering on specific columns.
    • D. Caching does not address the root cause of poor scan performance on a massive dataset. The most effective maintenance action is to physically organize the data around the common filter columns using clustering or Z-Ordering to ensure fewer files need to be accessed.

    Subdomain 2.4: Improve performance of production pipeline

    20.To ensure the reliability of a mission-critical pipeline, you need to be alerted if the output dataset suddenly contains 50% fewer rows than its historical average. Which Foundry support structure is specifically designed for this?

    1. A.A custom Python transform that counts rows and throws an exception if the count is low.
    2. B.A Data Health check configured for 'Row Count Anomaly' on the dataset.
    3. C.A Spark UI monitor tracking the recordsWritten metric.
    4. D.A Code Repository CI check that validates row counts during the PR process.
    Show answer & explanation

    Correct answer: BA Data Health check configured for 'Row Count Anomaly' on the dataset.

    • A. While it is possible to implement row-count logic within a custom Python transform, it is not a native Foundry support structure for monitoring. This approach increases maintenance overhead by shifting monitoring responsibility into pipeline code rather than using the built-in, centralized health tooling provided by the platform.
    • B. A Data Health check with a 'Row Count Anomaly' condition is the native Foundry mechanism specifically designed to monitor dataset quality. It automatically compares current run results against historical averages and triggers alerts when significant deviations occur, such as a 50% drop, without requiring manual coding.
    • C. Spark UI metrics, such as recordsWritten, are valuable for debugging job execution and evaluating performance. However, they are not an alerting structure for historical anomaly detection and do not provide dataset-level health monitoring integrated with Foundry's notification system.
    • D. Code Repository CI checks are used during the development and Pull Request process to validate code changes through linting or unit tests. They do not monitor runtime production data or historical row-count patterns after a pipeline has been deployed.

    Domain 3: DATA CONNECTION AND INTEGRATION IN FOUNDRY

    Subdomain 3.3: Identify general data connection capabilities useful for a given project

    21.When configuring a new JDBC source in Data Connection, how are the database credentials (username and password) securely managed?

    1. A.They are hardcoded in plain text within the sync's SQL query.
    2. B.They are stored in the Foundry Code Repository as environment variables.
    3. C.They are stored securely in the Data Connection credentials store and injected into the connection string at runtime by the Magritte agent.
    4. D.They are saved locally on the user's machine and prompted for every time the sync runs.
    Show answer & explanation

    Correct answer: CThey are stored securely in the Data Connection credentials store and injected into the connection string at runtime by the Magritte agent.

    • A. Hardcoding credentials in plain text within a query is a significant security risk and is not a permitted or recommended practice in Foundry. This would expose sensitive information to anyone with access to the sync configuration.
    • B. The Foundry Code Repository is used for version control and transformation logic, not as the primary secure vault for JDBC database credentials. Storing secrets as environment variables in code is not the standard architectural pattern for Data Connection sources.
    • C. Foundry's Data Connection provides a dedicated, encrypted credentials store. When a sync is initiated, the Magritte agent (the component responsible for data ingestion) securely retrieves these credentials and injects them into the connection string at runtime, ensuring secrets are never exposed in source code or UI metadata.
    • D. Credentials must be managed centrally within the platform to support automated and scheduled syncs. Prompting a user locally every time would prevent automation and does not scale in an enterprise environment.

    Subdomain 3.3: Identify general data connection capabilities useful for a given project

    22.You are writing a Python transform in Foundry that needs to make an HTTP request to an external weather API to enrich a dataset. By default, the transform fails with a network connection error. What steps must be taken to allow this outbound connection?(Select 2)

    1. A.Create an Egress Policy in the Control Panel specifying the external API's domain and port.
    2. B.Install a Magritte Agent on the external weather API's server.
    3. C.Apply the Egress Policy to the specific Project or Code Repository where the transform is running.
    4. D.Configure a Webhook in Data Connection to proxy the HTTP request.
    5. E.Change the transform language from Python to Java, as Python does not support external requests.
    Show answer & explanation

    Correct answers: A, CCreate an Egress Policy in the Control Panel specifying the external API's domain and port.; Apply the Egress Policy to the specific Project or Code Repository where the transform is running.

    • A. Correct. Creating an Egress Policy in the Control Panel is the standard mechanism used to explicitly allow outbound network traffic from Foundry compute environments to external hosts. You must specify the destination domain and port for security purposes.
    • B. Incorrect. Magritte Agents are used for connectivity into restricted environments or for data ingestion into Foundry. They are not installed on external third-party API servers to facilitate outbound HTTP requests from transforms.
    • C. Correct. Once an egress policy is defined, it must be explicitly applied or imported to the specific Project or Code Repository where the transform is running. Without this step, the network request remains blocked in that specific runtime context.
    • D. Incorrect. Webhooks in Data Connection are used for event-driven integrations or specific Action-based interactions, but they are not the mechanism for enabling general outbound HTTP connectivity from a Python transform runtime.
    • E. Incorrect. Both Python and Java support external HTTP requests. The issue is a platform-level network security restriction, not a limitation of the programming language.

    Subdomain 3.3: Identify general data connection capabilities useful for a given project

    23.You are tasked with ingesting a large volume of PDF documents from an Azure Data Lake Storage (ADLS) container into Foundry for natural language processing. How should you configure the sync?

    1. A.Configure a tabular sync and map the PDF binary content to a string column.
    2. B.Configure a raw file sync to ingest the PDFs directly into a Foundry dataset's file system.
    3. C.Use a JDBC source to connect to ADLS and query the PDFs using SQL.
    4. D.Convert the PDFs to CSV format on the Azure side before syncing.
    Show answer & explanation

    Correct answer: BConfigure a raw file sync to ingest the PDFs directly into a Foundry dataset's file system.

    • A. Incorrect. Tabular sync is designed for structured data organized in rows and columns. Mapping binary content into a string column is an inappropriate and inefficient pattern for document files, as it does not allow for standard file handling in downstream processes.
    • B. Correct. A raw file sync (or media sync) is the standard method for ingesting unstructured binary data like PDFs into Foundry. This approach preserves the original file format and structure within the dataset's file system, making it suitable for subsequent NLP libraries or OCR tools in Python transforms.
    • C. Incorrect. JDBC is used for establishing connections to relational databases to execute SQL queries. It is not used for transferring unstructured files from object storage like ADLS.
    • D. Incorrect. Converting PDFs to CSV is unnecessary and would result in a significant loss of document fidelity, layout, and metadata. This would hinder NLP performance, which often relies on the original structure of the document.

    Subdomain 3.2: Ingest unstructured data from an external source to Foundry

    24.A data engineer needs to ingest thousands of daily unstructured log files from an AWS S3 bucket into Foundry. They only want to ingest new files without reprocessing old ones to save compute and bandwidth. Which approach is the most efficient and native to Foundry Data Connection?

    1. A.Use a tabular sync with a primary key defined on the filename.
    2. B.Configure a file-based sync and enable the 'Incremental' setting based on the Last Modified Date.
    3. C.Write a Python transform to query the S3 API directly and compare it against the Foundry filesystem.
    4. D.Use a webhook to push files to Foundry individually as they are created.
    Show answer & explanation

    Correct answer: BConfigure a file-based sync and enable the 'Incremental' setting based on the Last Modified Date.

    • A. Tabular syncs are designed for structured, row-based data (like CSVs or Parquet) and treat data as records. They are not suitable for raw unstructured file ingestion, and defining a primary key on a filename does not natively handle the incremental detection of new files in the way a file-based sync does.
    • B. A file-based sync with incremental behavior is the native Foundry pattern for ingesting unstructured files from object storage like S3. Enabling the 'Incremental' setting allows Foundry to track state via the Last Modified Date, ensuring only newly added or updated files are pulled into the platform, which optimizes for both compute and bandwidth.
    • C. Writing a custom Python transform to query the S3 API is a manual implementation that bypasses the built-in security and state-management features of Foundry Data Connection. This approach increases maintenance overhead and is less efficient than using the native connector.
    • D. Webhooks are intended for event-driven triggers or small individual payloads and are not the standard or efficient mechanism for bulk file ingestion from S3. Managing thousands of file transfers daily via webhooks would be operationally complex and lack the robustness of a native batch file sync.

    Subdomain 3.2: Ingest unstructured data from an external source to Foundry

    25.An Oracle database stores scanned PDF documents in a BLOB column. You need to ingest these PDFs into Foundry as actual files for OCR processing. How can this be achieved in Data Connection?

    1. A.Use a standard tabular sync; Foundry automatically converts BLOB columns to files in a dataset.
    2. B.Write a custom JDBC extraction script to save the BLOBs to a local disk, then use a file-based sync to ingest them.
    3. C.Configure the JDBC source to use the 'Extract BLOB to File' sync type, mapping the BLOB column to the file content and another column to the filename.
    4. D.It is impossible to extract unstructured files from a relational database in Foundry.
    Show answer & explanation

    Correct answer: CConfigure the JDBC source to use the 'Extract BLOB to File' sync type, mapping the BLOB column to the file content and another column to the filename.

    • A. A standard tabular sync ingests BLOB data as binary fields within a dataset row (e.g., as a byte array). It does not automatically materialize these records as individual files in the dataset's filesystem, which is the format typically required for downstream OCR processing.
    • B. While manually staging files to a local disk using external scripts might be possible, it is considered an anti-pattern in Foundry. Data Connection provides native, secure capabilities to handle this ingestion directly from the source to the platform without requiring manual staging on the agent's host disk.
    • C. Foundry Data Connection supports 'Source-to-File' ingestion (often labeled as 'Extract BLOB to File' or similar in the UI). This allows you to treat a JDBC source as a file source by mapping one column (the BLOB) to the file content and another column to the file path/name, resulting in a dataset where each record is stored as a discrete file.
    • D. Foundry is fully capable of ingesting unstructured content from relational systems. When data is stored as BLOBs or CLOBs, it can be extracted and stored as files in Foundry using the correct sync configuration.

    Subdomain 3.2: Ingest unstructured data from an external source to Foundry

    26.What are the key differences between a tabular sync and a raw file sync in Foundry Data Connection?(Select 2)

    1. A.Tabular syncs parse the data into rows and columns, while raw file syncs copy the files byte-for-byte into the dataset's filesystem.
    2. B.Tabular syncs can only be used for databases, while raw file syncs can only be used for cloud storage.
    3. C.Raw file syncs support incremental appends of new files natively, whereas tabular syncs require a primary key or append-only column for incremental updates.
    4. D.Tabular syncs are always faster than raw file syncs regardless of data size.
    5. E.Raw file syncs automatically delete the source files after ingestion.
    Show answer & explanation

    Correct answers: A, CTabular syncs parse the data into rows and columns, while raw file syncs copy the files byte-for-byte into the dataset's filesystem.; Raw file syncs support incremental appends of new files natively, whereas tabular syncs require a primary key or append-only column for incremental updates.

    • A. Correct. Tabular syncs interpret the source data as structured records and load them into a dataset schema consisting of rows and columns. Raw file syncs instead preserve the original file format and copy the data byte-for-byte into the dataset's filesystem without parsing.
    • B. Incorrect. Both sync types are versatile across source systems. Tabular syncs can ingest structured files like CSV or Excel from file systems, and raw file syncs are not limited to cloud storage; they can be used for various source systems like SFTP or HDFS.
    • C. Correct. In Foundry Data Connection (Magritte), raw file syncs natively support incremental ingestion by discovering and ingesting new files. Tabular syncs generally require specific structured logic, such as a primary key or an append-only column (e.g., a timestamp), to determine which records are new.
    • D. Incorrect. Performance depends on the source system, network, and file sizes. Raw file syncs can often be faster because they avoid the overhead of parsing and schema application during the ingestion phase.
    • E. Incorrect. Raw file syncs do not automatically delete source files after ingestion. They create a copy in Foundry, leaving the source system's retention and deletion behavior to be managed externally.

    Subdomain 3.1: Ingest tabular data from an external source to Foundry

    27.What is the primary purpose of defining a 'fallback sync configuration' when setting up data ingestion in Palantir Foundry?

    1. A.To automatically switch to a secondary database if the primary database goes offline.
    2. B.To define an alternative sync configuration (e.g., a full snapshot) that runs automatically if an incremental sync fails due to expired logs or missing high-water marks.
    3. C.To route data to a backup Foundry environment during a disaster recovery event.
    4. D.To downgrade the Magritte Agent version if a new plugin update causes instability.
    Show answer & explanation

    Correct answer: BTo define an alternative sync configuration (e.g., a full snapshot) that runs automatically if an incremental sync fails due to expired logs or missing high-water marks.

    • A. Incorrect. This describes a database failover mechanism or high availability setup, which is typically managed at the database or infrastructure level. Fallback syncs in Foundry do not manage switching between primary and secondary source databases.
    • B. Correct. In Foundry, a fallback sync configuration is designed to handle scenarios where an incremental sync cannot proceed, such as when source transaction logs have expired or the high-water mark is no longer valid. This allows the system to automatically trigger an alternative method, such as a full snapshot, to maintain data flow.
    • C. Incorrect. Routing data between different Foundry environments for disaster recovery is a platform-level architectural concern and is not the function of an individual data sync's fallback configuration.
    • D. Incorrect. Managing Magritte Agent versions is a software administration task. Fallback syncs handle data ingestion strategies (like switching from incremental to full) rather than software versioning or plugin management.

    Subdomain 3.1: Ingest tabular data from an external source to Foundry

    28.Which of the following is a primary mechanism or feature used to connect to and explore tabular data from an external source in Palantir Foundry?

    1. A.Magritte Agent Logs
    2. B.Virtual Tables / Data Proxy
    3. C.Incremental Append Sync
    4. D.Webhooks
    Show answer & explanation

    Correct answer: BVirtual Tables / Data Proxy

    • A. Incorrect. Magritte Agent Logs are used for monitoring, troubleshooting, and observing the health and activity of the Magritte agent. They provide diagnostic information but do not serve as a mechanism for ingesting tabular data.
    • B. Correct. Virtual Tables and the Data Proxy are key features of Foundry Data Connection. Virtual Tables allow users to explore external database schemas and preview data without full materialization, while the Data Proxy facilitates secure communication between Foundry and external sources via the Magritte agent.
    • C. Incorrect. Incremental Append Sync is a specific synchronization strategy for updating datasets by only bringing in new records. While it is used during the ingestion process, it is a configuration pattern rather than the underlying mechanism for external connectivity and discovery.
    • D. Incorrect. Webhooks are event-driven callbacks typically used for real-time notifications or triggering external actions. They are not the primary method for ingesting or connecting to structured tabular data sources in Foundry.

    Subdomain 3.1: Ingest tabular data from an external source to Foundry

    29.When configuring a connection to an external source (such as a REST API) for data ingestion in Palantir Foundry, which of the following authentication methods are commonly supported?(Select 3)

    1. A.Basic Authentication (Username/Password)
    2. B.Bearer Token / API Key
    3. C.OAuth 2.0 (Client Credentials flow)
    4. D.Biometric Authentication (Fingerprint/FaceID)
    5. E.CAPTCHA solving
    Show answer & explanation

    Correct answers: A, B, CBasic Authentication (Username/Password); Bearer Token / API Key; OAuth 2.0 (Client Credentials flow)

    • A. Basic Authentication is a standard method supported by Foundry Data Connection. It involves sending a username and password (often Base64 encoded) to the external source's endpoint. While newer protocols are more secure, it remains common for legacy systems and certain internal services.
    • B. Bearer Tokens and API Keys are widely used for authenticating REST API requests. Foundry allows for these tokens to be configured within the Source or as part of the connection configuration (often passed via Authorization headers) to facilitate secure ingestion.
    • C. OAuth 2.0 (specifically the Client Credentials flow) is the industry standard for machine-to-machine (M2M) authentication. Foundry supports this flow to obtain access tokens from an identity provider without requiring interactive user login, making it ideal for automated ingestion pipelines.
    • D. Biometric authentication is designed for verifying human identity on physical devices (like mobile phones or laptops). It is not applicable or supported for automated, service-to-service data ingestion pipelines within Palantir Foundry.
    • E. CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is designed to block automated access to web services. It is the opposite of an integration mechanism and cannot be used as an authentication method for automated data pipelines.

    Domain 4: ONTOLOGY DESIGN AND DEVELOPMENT IN FOUNDRY

    Subdomain 4.1: Design an ontology based on application requirements and available data

    30.A data engineer is integrating a flight dataset into the Foundry Ontology. The dataset's uniqueness is defined by a combination of three columns: 'flight_number', 'departure_date', and 'airline'. How should the engineer define the primary key for the Flight object type in the Ontology Manager?

    1. A.Select all three columns as primary keys in the Ontology Manager.
    2. B.Concatenate the three columns into a single unique string column in the data pipeline and set it as the primary key.
    3. C.Use the flight_number as the primary key and set the other two as foreign keys.
    4. D.Configure the Ontology to auto-generate a UUID for each row during the sync.
    Show answer & explanation

    Correct answer: BConcatenate the three columns into a single unique string column in the data pipeline and set it as the primary key.

    • A. Palantir Foundry Ontology requires each object type to have a single property designated as the primary key. Selecting multiple columns as a composite primary key is not supported directly within the Ontology Manager UI.
    • B. The best practice for handling composite keys in Foundry is to create a deterministic, single-column unique identifier in the upstream data pipeline (e.g., via concatenation or hashing). This ensures stable object identity across syncs and adheres to the requirement for a single primary key property.
    • C. Using only one part of a composite key (like flight_number) would fail to uniquely identify each record, leading to data collisions where multiple flights share the same ID. Foreign keys are intended to link different object types, not to define uniqueness within a single object.
    • D. Auto-generating UUIDs during sync is generally discouraged because it can result in unstable identities if the data is reprocessed or the sync is re-initialized. It is better to use a deterministic key derived from the source data to ensure consistency and traceability.

    Subdomain 4.1: Design an ontology based on application requirements and available data

    31.When defining a link between two object types in the Palantir Foundry Ontology, what happens during the indexing process if some records in the backing dataset have a null value in the property designated as the foreign key (e.g., a 'remote' employee without an assigned office)?

    1. A.The pipeline sync will fail due to a null foreign key constraint.
    2. B.The sync will succeed, and the link will simply not exist for remote employees.
    3. C.You must replace nulls with a dummy value like 'UNKNOWN' for the sync to succeed.
    4. D.The remote employees will be dropped from the Ontology entirely.
    Show answer & explanation

    Correct answer: BThe sync will succeed, and the link will simply not exist for remote employees.

    • A. The pipeline sync will not fail due to a null foreign key constraint. Foundry is designed to handle null values in foreign keys gracefully; if the relationship field contains nulls, they are handled without breaking the indexing process.
    • B. This is the standard behavior in Foundry. If a link is modeled and the foreign key column contains a null value, the record will still sync successfully as an object, but the specific relationship (link) will simply not be created for that instance. This preserves the entity while omitting the missing association.
    • C. Replacing nulls with dummy sentinel values is not required for the sync to succeed. Foundry handles nulls in foreign keys naturally, and using nulls is generally preferred over dummy values to represent optional or missing relationships.
    • D. The object indexing process is independent of link creation for the primary entity. As long as the primary key is valid, the remote employee records will still exist in the Ontology; only the link to the related object (e.g., Office) will be absent for those specific records.

    Subdomain 4.3: Provide data engineering context useful for use case development

    32.You are designing the backing pipeline for a Tickets object type. Users should only be able to view tickets assigned to their specific geographic region. How should you implement this security requirement at the data engineering layer for the Ontology?

    1. A.Create a Restricted View (RV) on the backing dataset applying the region-based security logic, and map the object type to the RV.
    2. B.Apply a filter directly in the Workshop application's object set variable.
    3. C.Use an Action type to automatically delete rows that a user is not authorized to see.
    4. D.Create separate object types for each region and use Object Explorer to route users.
    Show answer & explanation

    Correct answer: ACreate a Restricted View (RV) on the backing dataset applying the region-based security logic, and map the object type to the RV.

    • A. Correct. A Restricted View (RV) is the standard Palantir Foundry mechanism for enforcing row-level security. By applying region-based logic to the RV and mapping the object type to it, security is enforced at the data layer. This ensures users only see authorized records across all Ontology-aware applications, such as Workshop, Object Explorer, and Quiver.
    • B. Incorrect. Filtering within a Workshop application's object set variable only affects the specific application's view. It is not a true security control because it does not prevent unauthorized access to the underlying data via other interfaces or the Ontology itself.
    • C. Incorrect. Action types are used to facilitate data modifications and writebacks, not for access control. Using actions to delete rows for security purposes is destructive, non-standard, and would result in data loss rather than restricted visibility.
    • D. Incorrect. Creating separate object types for every region is not scalable and creates significant maintenance overhead. This approach complicates the Ontology design and ignores the built-in row-level security capabilities provided by Restricted Views.

    Subdomain 4.3: Provide data engineering context useful for use case development

    33.A pipeline produces a dataset where 5% of the rows have a null value in the column intended to be the primary key. What will happen when syncing this dataset to the Ontology, and how should the data engineer fix it?

    1. A.The sync will succeed and group all nulls into a single object; the engineer should leave it as is.
    2. B.The sync will fail because primary keys cannot be null; the engineer must filter out null rows or assign a generated UUID in the pipeline.
    3. C.The Ontology will automatically generate sequential IDs for the null rows; no fix is needed.
    4. D.The sync will succeed but the objects will be invisible; the engineer must change the property type to String.
    Show answer & explanation

    Correct answer: BThe sync will fail because primary keys cannot be null; the engineer must filter out null rows or assign a generated UUID in the pipeline.

    • A. Null values cannot serve as valid primary keys for ontology object identity. The sync will not group them into a single object because primary keys must be non-null to establish object existence and identity.
    • B. Primary keys must be non-null and unique because they are used to uniquely identify ontology objects. If the source data contains nulls in the primary key column, the indexing process will fail. The data engineer must resolve this upstream by filtering out invalid records or assigning stable, unique identifiers such as UUIDs.
    • C. The Ontology does not provide a feature to automatically generate sequential IDs or surrogate keys for null records during the sync process. Identity must be explicitly provided by the input dataset.
    • D. Changing the property type to String does not resolve the absence of a value. The issue is structural identity requirements, not data type compatibility. The sync will fail regardless of the data type if the value is null.

    Subdomain 4.2: Implement pipelines backing ontology objects and links

    34.A data engineer is building a pipeline to back a Flight object type. The source data occasionally contains duplicate flight_id records due to upstream system retries. If the backing dataset with duplicate primary keys is synced to the Ontology, what is the expected behavior?

    1. A.The sync will fail entirely, and no data will be updated in the Ontology.
    2. B.The Ontology will randomly select one of the duplicate rows to represent the object.
    3. C.The Ontology sync will succeed, but queries on the object will return an error until duplicates are resolved.
    4. D.The Ontology will automatically merge the duplicate rows by taking the non-null values from each.
    Show answer & explanation

    Correct answer: AThe sync will fail entirely, and no data will be updated in the Ontology.

    • A. Correct. In Palantir Foundry, backing datasets for Ontology objects must have unique primary keys. If the indexing process (Phonograph sync) detects multiple rows sharing the same primary key value, the sync job will fail with a duplicate primary key error. This ensures data integrity and deterministic object identity.
    • B. Incorrect. The Ontology does not arbitrarily or randomly select rows when duplicates are present. This would result in non-deterministic behavior and inconsistent data, which Foundry is designed to prevent by enforcing strict primary key constraints.
    • C. Incorrect. The presence of duplicate primary keys is a data integrity issue validated at sync time (write-time), not query time. The sync job will fail to update the index rather than allowing corrupted data to be queried.
    • D. Incorrect. The Ontology does not perform automated merging logic or 'upsert' style conflict resolution based on null/non-null fields during the sync. Deduplication and merging must be handled upstream in the data transformation pipeline (e.g., using Spark or Pipeline Builder).

    Subdomain 4.2: Implement pipelines backing ontology objects and links

    35.You are implementing a pipeline to back a One-to-Many (1:N) link between Department (1) and Employee (N). To optimize the Ontology sync and minimize dataset maintenance, how should you configure the backing dataset for this link?

    1. A.Create a separate join dataset containing department_id and employee_id.
    2. B.Use the Employee backing dataset and map the department_id foreign key column directly to the link.
    3. C.Use the Department backing dataset and add an array of employee_ids.
    4. D.Create a Restricted View that unions Department and Employee datasets.
    Show answer & explanation

    Correct answer: BUse the Employee backing dataset and map the department_id foreign key column directly to the link.

    • A. Creating a separate join dataset is usually unnecessary for a standard 1:N relationship when the foreign key already exists on the many-side object. Creating an extra dataset adds maintenance overhead and increases the complexity of the Ontology sync process compared to using the foreign key.
    • B. The preferred and most efficient pattern is to use the existing many-side backing dataset (Employee). Since the many-side object typically carries the foreign key (department_id), mapping that column directly to the link minimizes maintenance, leverages existing pipelines, and aligns with Foundry best practices.
    • C. Storing an array of employee IDs on the one-side (Department) backing dataset is not optimal. This would require denormalizing data and continuously maintaining a derived array, which is significantly less efficient and more complex to manage than using the foreign key on the Employee side.
    • D. A Restricted View that unions unrelated entity datasets is not a correct way to model a 1:N link. Unions are meant for merging datasets with similar schemas, and using them here would add unnecessary complexity without providing a functional basis for the link.

    Want the full experience?

    These are just samples. Practice the full Palantir Foundry Data Engineer Certification question bank in quiz mode — free, no signup, with domain practice and exam simulation.