# Create a dataset batch pipeline with Pipeline Builder In this tutorial, you will use Pipeline Builder to create a simple pipeline with an output of a single dataset with information on flight alerts. You can then analyze this output dataset with tools like Contour or Code Workbook to answer questions such as which flight paths have the greatest risk of disruption. The datasets used below are searchable by name in the dataset import step; you can find them in your Foundry filesystem. At the end of this tutorial, you will have a pipeline that looks like the following: ![A complete Pipeline Builder pipeline.](../../../assets/9e4c92fc1ab6601bce2d864c7758be32dd37bcb1eca536d22270e05011f0ebd0.webp) The pipeline will produce a new dataset output of `Flight Alerts Data` that you can use for further exploration in the platform. For a more detailed walkthrough, review the [deep dive course on building your first pipeline ↗](https://learn.palantir.com/deep-dive-building-your-first-pipeline) on the Palantir Learning portal. ## Part 1: Initial setup First, create a new pipeline. 1. When logged into Foundry, select **Applications** from the left navigation sidebar to search for and open **Pipeline Builder**

![The Pipeline Builder application, found in the application search.](../../../assets/1f911c21d656a17d579794258b511ae867ed9c41826f1cde664ce1e279683c75.webp)

2. Next, on the Pipeline Builder landing page, create a new pipeline by selecting **New pipeline**, then choose **Batch pipeline**. Under **Select batch compute**, choose **Standard**.

![Choose to create a batch pipeline.](../../../assets/e818454cfb6eaceb3e14120a188477cc2f10cf7430aadd616c8e4cde94bc7393.webp)

:::callout{theme="neutral"} The ability to create a streaming pipeline is not available on all Foundry environments. Contact Palantir Support for more information if your use case requires it. ::: 3. Select a location to save your pipeline. You cannot save pipelines in personal folders.

![The choose pipeline location popover.](../../../assets/b1c16350d031a6a4110a437896420a97c0d3753309a0f1b67e93f62d1787d5dd.webp)

4. Select **Create pipeline**. ## Part 2: Add datasets Now, you can add datasets to your pipeline workflow. Use sample datasets of notional or open-source data. From the Pipeline Builder page, select **Add datasets** from Foundry. ![Add datasets to your pipeline.](../../../assets/96a52a11223286f8b284353496b81cc0bdd5be8ba06f3016fed36765fd1a1b67.webp) Alternatively, you can drag and drop a file from your computer to use as your dataset. In this walkthrough example, you can add the `passengers_preprocessed`, `flight_alerts_raw`, and `status_mapping_raw` datasets. To add a selection of datasets, select the dataset. Then, choose the inline **+** icon, or select **Add to Selection**. ![Add a dataset using the + icon.](../../../assets/9ef99a86057925c0fc487d7341c39a5ff78581d531d358502391022001e7a66b.webp) After selecting all required datasets, choose **Add datasets**. ![Three dataset nodes on a Pipeline Builder graph.](../../../assets/b21141ebf0c06e4c45bdc2dd6df4c58a7d1354f7ca9875a22b8f248c2eb16105.webp) ## Part 3: Clean data After adding raw datasets, you can perform some basic cleaning transforms to continue defining your pipeline. You will transform three of your raw datasets. ### Dataset 1 The first step is to clean the `passengers_preprocessed` dataset. Start by setting up a cast transform to change the `dob` column name into `dob_date` while converting the values to the `MM/dd/yy` format. #### Cast transform 1. Select the `passengers_preprocessed` node in your graph. 2. Select **Transform**.

![Choose to transform the dataset from your graph.](../../../assets/d6dd89717b886434849ed5948867055aebca1587993be1ae933027278d65675a.webp)

3. Search for and select the **cast** transform from the dropdown menu to open the cast configuration board.

![Apply a cast transform to your selected dataset.](../../../assets/09be9c2210aa3ac415d503d14a6d868c4955f589ff5246bbd4871bcbfbebc43d.webp)

4. From the **Expression** field, select `dob`; for **Type**, select `Date`. 5. Enter `MM/dd/yy` for the **Format** type. Be sure to use uppercase `MM` to ensure a successful cast transform. Change the output column name to `dob_date`. Your cast board should look like this:

![A completed cast transform board.](../../../assets/a7a7477a0a6ee0a4ff683bc9ec5858ed7d6c6194afc9ec9c0153120e0100a413.webp)

6. Select **Apply** to add the transform to your pipeline. #### Title case transform Now, you can format the `flyer_status` column values to start with an uppercase letter. 1. In the transform search field, search for and select the **Title case** transform to open the title case configuration board. 2. In the **Expression** field, select the `flyer_status` column from the dropdown. Your title case board should look like this:

![A completed title case transform board.](../../../assets/e64f0adceacae935f04b5ed4e618f69b2e7169840f68161c8763c6ed7bcbb684.webp)

3. Select **Apply** to add the transform to your pipeline. 4. In the top left corner of the transform configuration window, rename the transform `Passengers_Clean`.

![Rename the transform to customize it to your dataset.](../../../assets/ed57a87f220a0b864cb6b40c287ba20cab6a580629ac6ee3d7a345b7707708ba.webp)

5. Select **Back to graph** at the top right of the screen to return to your pipeline graph.

![The pipeline graph with a new transform node.](../../../assets/743b694b04298711b3fa449b61d93b60fd04ac18242e7a71f98825afff9bb043.webp)

### Dataset 2 Now, clean the `flight_alerts_raw` dataset. The first step is to set up another cast transform to convert the `flight-date` column values into a `MM/dd/yy` format. #### Cast transform 1. Select the `flight_alerts_raw` dataset node in your graph. 2. Select **Transform**.

![Choose to transform a new dataset from your graph.](../../../assets/a4533f471b63e81dd8a2da39fd97192e8ed8dad761fdb8c171ca00c5365aa818.webp)

3. Search for and select the **cast** transform from the dropdown menu to open the cast configuration board. You can read the function definition listed on the right side of the selection box to learn more about the function.

![Search for the cast transform board.](../../../assets/b6ec7fe9cbb1633cb0b53fb12bab20a52aa2dfa59e118a8f85ffd6cf7b274e75.webp)

4. In the **Expression** field, select the `flight_date` column from the dropdown. 5. Choose `Date` from the **Type** field dropdown menu. 6. Enter `MM/dd/yy` for the **Format** type. Be sure to use uppercase `MM` to ensure a successful cast transform. Your cast board should look like this:

![A completed cast transform board.](../../../assets/a7f0fb5f789d08604867d28d45b5a385884a4cb0f27d744e65b0781e8243019a.webp)

7. Select **Apply** to add the transform to your pipeline. #### Clean string transform Now, add a **Clean string** transform that will remove whitespace from `category` column values. For example, the transform will convert `delay···` string values to `delay`. 1. Search for and select the clean string transform from the dropdown to open the clean string configuration board. 2. In the **Expression** field, select the `category` column from the dropdown menu. 3. Check the boxes for all three of the **Clean actions** options: * Converts empty strings to null * Reduce sequences of multiple whitespace characters to a single whitespace * Trims whitespace at beginning and end of string Your clean string board should look like this:

![A completed clean string transform board.](../../../assets/8ed69a3da7160ef8dcbede748eecd58cf9c8b69a784f9ddee065e43e2a5ed182.webp)

4. Select **Apply** to add the transform to your pipeline. 5. In the top left corner of the transform configuration window, rename the transform `Flight Alerts - Clean`. 6. Select **Back to graph** at the top right to return to your pipeline graph.

![The pipeline builder graph with two transform nodes.](../../../assets/6225ccb7a43be422470c13f99bb276baa86f63373b8fcd1767c63c9374cd7ca1.webp)

### Dataset 3 Finally, clean the `status_mapping_raw` dataset. #### Clean string transform You will only apply a **Clean string** transform to this dataset. 1. Select the `status_mapping_raw` dataset node in your graph. 2. Select **Transform**.

![Choose to transform a dataset from the graph.](../../../assets/b4dd3d055ace4edc7727adb26297828e0c918d989f4a92fc6ce7e4995d1faada.webp)

3. In the **Search transforms and columns...** field, select the `mapped_value` column from the dropdown menu.

![Choose the mapped\_value column in the transform board.](../../../assets/7c080405ba674908c52dda069c31acac2fbfcc1ea3458e5420740e52bae4b319.webp)

4. In the same field, search and select the clean string transform from the dropdown. 5. Check the boxes for all three of the **Clean actions** options: * Converts empty strings to null * Reduce sequences of multiple whitespace characters to a single whitespace * Trims whitespace at beginning and end of string Your clean string board should look like this:

![A completed clean string transform board.](../../../assets/2e24bf6c285680e290a8de2f2e12aeb79d66e6db1e2b9f73a27e33754ed80587.webp)

6. Select **Apply** to add the transform to your pipeline. 7. In the top left corner of the transform configuration window, rename the transform `Status Mapping - Clean`. 8. Select **Back to graph** at the top right to return to your pipeline graph. You can see the connection between the transforms you just added and the datasets to which you applied them.

![A pipeline builder graph with three dataset and three transform nodes.](../../../assets/ec3b7050af17a13df947b7bae44c2f973db4c532a3a9937289eb9bb651dda138.webp)

## Part 4: Join datasets Now, you can combine some of the cleaned datasets with **joins**. A join allows you to combine datasets with at least one matching column. You will add two joins to your pipeline workflow. ### Join 1 Your first join will combine two of the cleaned datasets. 1. Select the `Flight Alerts - Clean` transform node. This will be the left side of the join. 2. Select **Join**.

![Choose to join a dataset from the graph.](../../../assets/de129f561da876483939ab0d12246a4c77f7ee632e7921af33ef42f33bfdf2db.webp)

3. Choose the `Status Mapping - Clean` node to add it as the right side of the join. 4. Select **Start** to open the join configuration board.

![Select Start to join the selected datasets.](../../../assets/b914d4ef0360936277b8fb19345a8e8625d3c6848deda84d0f74786c307ac5e5.webp)

5. Verify that the **Join type** is set to `Left join`. 6. Set the **Match condition** columns to `status` is equal to `value`. 7. Select **Show advanced** to view additional configuration options. 8. Set the **Prefix** of the right `Status Mapping - Clean` dataset to `status`. Your join configuration board should look like this:

![A completed join board.](../../../assets/1cb6e19af322290a60044e53dcd160a6c7eab2bec84bd9f884f97d3a3852df6c.webp)

9. Select **Apply** to add the join to your pipeline. 10. View a preview of the join output table in the **Preview** pane at the bottom of the configuration window.

![A preview of the join output.](../../../assets/55bb5c6fd7c1d15b4633f56440ba4467db103f0efa31f6788bfe487e276b1ff4.webp)

11. In the top left corner of the join configuration window, rename the join `Join Status`. 12. Select **Back to graph** at the top right to return to your pipeline graph.

![A pipeline graph with the new join node.](../../../assets/ae687166aff70ca33cdd0f6f8803301bd0000af11f963dc19ca6c01e10155e2b.webp)

13. To make the graph easier to read, select the **Layout** icon to automatically arrange the datasets, or manually drag the two connected datasets next to each other.

![Use the layout tool to neatly organize the pipeline graph.](../../../assets/10ede15e55976addc3bbfd8852b677601ee70b5cbb27641bba00f9ef65333965.webp)

### Join 2 For your second join, combine your first join output table with another raw dataset. 1. Add the `priority_mapping_raw` dataset to the graph by selecting **Add datasets**. 2. Select the `Join Status` node you just added to the graph. This will be the left side of the join. 3. Select **Join**. 4. Select the `priority_mapping_raw` dataset node to add it as the right side of your join. 5. Select **Start** to open the configuration board.

![Select Start to join the selected nodes.](../../../assets/3c6032e5f9ec83e2bd2a577e33eb5d17aca2db1dbfda8cbf7263795003bf8077.webp)

6. Verify that the **Join type** is set to `Left join`. 7. Set the **Match condition** columns to `priority` is equal to `value`. 8. Select **Show advanced** to view additional configuration options. 9. Set the **Prefix** of the right `priority_mapping_raw` dataset to `priority`. Your join configuration board should look like this:

![A completed join configuration.](../../../assets/10dd4e9d49fc08c73d958f748e19c5507efb88435d070fd96f16b1b9c87d2613.webp)

10. Select **Apply** to add the join to your pipeline. 11. View a preview of the join output table in the **Preview** pane at the bottom of the configuration window.

![A preview of the configured join.](../../../assets/4bb44ccc6c67c6e967c84408f49ce3b1a74787bf2107cf7596f9971761c2c07c.webp)

12. In the upper left corner of the join configuration window, rename the join `Join (2)`. 13. Select **Back to graph** at the top right to return to your pipeline graph. You can now see the connection between the joins you just added and the datasets to which you applied them. ![The pipeline graph with another join node.](../../../assets/0ebdb56fdaa28737c137ac5774bd90f7c290289245f31ce856f1c35879b2fba3.webp) ## Part 5: Add an output Now that you have finished transforming and structuring your data, you can add an output. For this tutorial, you will add a dataset output. 1. In the **Pipeline outputs** sidebar to the right of the Pipeline Builder graph, name the output `Flight Alerts data`. Then select **Add dataset output**. 2. Link `Join (2)` to the output by selecting the white circle to the right of the join node and connecting it to the `Flight Alerts data` dataset. 3. Select **Use input schema** to use existing schema. 4. From here, select the columns of data to keep. In this case, keep all the data together.

![Select the columns to include in the output dataset.](../../../assets/9f75383a5e8a897bbc832cd2ee5dd27cd79c4558f8b96ad7b129db71a9641ba9.webp)

## Part 6: Build the pipeline To build your pipeline, select **Deploy** in the top right of your graph. Then, choose **Save and deploy**. ![Choose to save and deploy to build your pipeline](../../../assets/de31d13aab3a88d1979e47e77aa7b3a3a2702e3c9c4dc762c74641fd247cb3bb.webp) You should see a small alert indicating the deploy was successful. Select **View** in the alert box to open the **Build progress** page. ![Screenshot of build progress page](../../../assets/c8664889dc101c0618be2133904367617367ec47dd37aedfa2cc255c78031731.webp) From this page, you can monitor the progress of your build until the dataset output is ready. ![Screenshot of build progress with succeed status page](../../../assets/b8f603873c4de5fee48cc0d2641322bf9f83552121c83585699b6569d5aa38ba.webp) You can now access your dataset by selecting **Actions > Open**. ![Screenshot of dataset output](../../../assets/285488f2e3babd5d24f794a96c388b93be0d603bf3aa15b30d4eed641a3edc15.webp) With this last step, you generated your pipeline output. This output is a dataset that can be further explored in other applications in Foundry, such as [Contour](../../contour/analysis-create-path/index.md#starting-an-analysis-from-datasets-in-foundry) or [Code Workbook](../../code-workbook/workbooks-overview/index.md).