2. [Repositories] Introduction to Data Transformations6. Testing And Committing Your Code
Feedback

6 - Testing and committing your code

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

Your transform takes the input dataset and passes it through to an output without applying any transformations per se. Even the simplest of code transforms should be tested before they are committed to your branch, and this task will cover each process. Before you can test your code using the Preview option, you’ll need to ensure that the Code Assist helper application is running. Code Assist, which runs in parallel with your code repository session, provides auto-completion, compilation errors, and other IDE-like features for your code repository. It appears as a narrow bar across the bottom of your repository indicating its status.

🔨 Task Instructions

ℹ️ Commit messages provide another layer of documentation that can be helpful in maintaining your production pipeline.

  1. Click the Preview button in the top right area of the screen to execute the transformation logic against a configurable subset of the input. The Preview helper window opens at the bottom of your application.

  2. Having verified the results look as expected, you’re ready to commit your code to your branch. Click the Commit button in the upper right area of the screen.

  3. Provide a short but descriptive commit message in line with your organization’s code management practice. For example: “feature: add raw datasets.”

  4. Each repository commit and/or build initiates a continuous integration ↗ (CI) check that compiles all commits to ensure pipeline hygiene. The time it takes this important step complete depends on the complexity of the repository.

    To review the status of your check (and the history of all checks in the repository), click the More ▾ dropdown menu at the top center of your screen and choose the Checks option (if there is no More ▾ dropdown, simply click the Checks option along the top of your application).

    From here, you can click into the check block for log details if desired.

  5. The CI process creates empty dataset containers and folder paths for the output(s). Click the ... in the very top left of your screen to expose the folder path to your repository.

  6. Ctrl+click the Datasource Project: Flight Alerts folder in the dropdown list to open it in a new tab.

  7. Because your defined output path in your repository specified ../datasets/raw/ as the output location, that folder path has been created by the CI check. Click into ../datasets and then /raw/.

  8. Click on your empty dataset container for flight_alerts_raw and notice there is no data available either on the Master or yourName/feature/data_eng_tutorial_2 branches.

  9. Return to your code repository.

Learn more about the Preview options available to you by reading this documentation page.