2. [Repositories] Introduction to Data Transformations3. Creating A Code Repository
Feedback

3 - Creating a Code Repository

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

📖 Task Introduction

Each stage in your pipeline should have a dedicated code repository where you develop and maintain the code-based data transformations in a structured setting. Let’s begin by creating a repository for your Datasource project.

⚠️ A prerequisite for this tutorial is to have created a dedicated save location for your work later on. If you have not set this up yet, follow the instructions below:

  1. First, follow each of the following steps in turn to find a Project folder in which to create your sandbox folder.

    1a. Select Projects at the top of the screen, then search for a project named Foundry Training & Resources and open it. Then, select the Foundry Reference Project folder. Next, select on its **Temporary Training** Artifacts subfolder. If there is a selectable + New option near the top-right corner of this view, you will be able to build your sandbox folder here; skip ahead to Step 2 to create your folder. Otherwise, continue to Step 1b.

    1b. If you did not have the ability to create a New folder in the Foundry Training & Resources project, instead select Projects at the top of the screen, then search for a project named Temporary Training Artifacts. If your Foundry configuration has such a project, it will have been configured granting rights to write new data to all users. If you cannot find a project like this, depending on how your administrators control project creation permissions, you may be able to create it yourself — if you do, make sure to give Everyone in your organization the Editor role. If you have this project, select it to open it and skip ahead to Step 2 to create your folder, otherwise, continue to Step 1c.

    1c. Your Foundry enrollment may not have been configured with a Project to which all users can write new data. In order to complete future tutorials, you'll need such a project to be created. Ask your Foundry Administrator or Palantir Support to create a project named Temporary Training Artifacts that grants Editor access to all users by default. Once that's created, open that Project and proceed with Step 2 to create your folder.

  2. Once you’ve opened the Temporary Training Artifacts project, create a folder with your name and save your resources there. .../**Temporary Training** Artifacts/yourFolder/...

🔨 Task Instructions

  1. Proceed to the Datasource project folder you created in the previous tutorial, i.e., .../**Temporary Training** Artifacts/${yourName}/Data Engineering Tutorials/Datasource Project: Flight Alerts/.
  2. In that folder, create a new code repository by clicking on the green ➕ New ▾ button in the top right of your screen and choosing Code Repository from the dropdown list of artifacts.
  3. In the Name your repository section of your repository initialization screen, type flight_alerts_logic.
  4. Choose Python as your language template in the Data Transforms block in the Repository type section.
  5. Select Initialize repository on the right side of the Data Transforms block.

Your repository is now bootstrapping with the default template files needed to transform data with Python.

You can enable multi-language repositories (e.g., SQL + Python or Python + Java) after your initialization by creating a sub-project using the process described in File editor on Navigation. For more information on the data transformation languages available, take a moment to read about Supported languages.