domino logo
Latest (5.6)
  • Tech Ecosystem
  • Get Started
  • Domino Cloud
  • Code Assist
  • Collaborate
  • Projects
  • Work with Data
  • Workspaces
  • Environments
  • Executions
  • Deploy Models and Apps
  • Model Monitoring
  • Organizations
  • Security and Credentials
  • Notifications
  • Download the Audit Log
  • Data Planes
  • Search Your Domino Deployment
  • Domino CLI
  • Troubleshooting
  • Get Help
  • Send Feedback
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Work with Data
>
Data Sources
>
Connect to Data Sources
>
Connect to Palantir Foundry

Connect to Palantir Foundry

This topic describes how to connect to Palantir Foundry from Domino. Palantir Foundry is an enterprise-level data management platform. To connect successfully, you must have network connectivity between Palantir and your Domino deployment.

There are two ways to connect to Palantir Foundry:

  • Create a Palantir Foundry data source

  • Connect using environment variables

Create a Palantir Foundry data source

Administrators can create a data source for Palantir Foundry that Domino users can access. Domino recommends this method. See the Admin Guide for details.

After your administrator has created the data source, you can query it as usual.

Note

Connect using environment variables

To connect to Palantir Foundry using this method, you must have the following:

  • A Palantir Foundry account.

  • An access token.

  • A path to the dataset.

Create an access token

  1. Sign in to Palantir Foundry.

  2. In the Foundry sidebar, click Account and select Settings.

  3. Under User settings, click Tokens.

    Screenshot of Palantir UI
  4. Click Create token.

  5. Copy the user token and save the token string. You can store it as an environment variable in Domino.

Copy the dataset path

  1. In the Palantir Foundy application, go to the Project containing the dataset to access.

  2. From the Code section, select the dataset.

  3. In the About section, hold the cursor over the path by the Location attribute and click the clipboard icon to copy the path.

    Tip
  4. Save the path or RID string to store as an environment variable in Domino.

Add environment variables to Domino

You can store your Palantir connection information securely in Domino as environment variables in your user or project settings.

  1. Sign in to Domino.

  2. Click User or Project settings.

  3. Click Environment Variables.

  4. Add the PALANTIR_TOKEN environment variable with the value of the user token you created in Foundry.

  5. Add the PALANTIR_HOSTNAME environment variable with the value of your Foundry instance hostname.

Add the Palantir-SDK package to your environment

Some Domino workspace environments have the palantir-sdk package installed by default. You can also add Dockerfile commands to the environment definition to add packages:

RUN pip install -user palantir-sdk

You can also create a cell at the top of a Jupyter notebook and run the following:

pip install palantir-sdk

Run your code

You can now access your Palantir Foundry data through Python, from a Jupyter notebook or VS Code.

Screenshot of a Jupyter notebook accessing a Palantir dataset and using the Palantir SDK
Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.