# Customize Environments Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/index Customize Domino Environments by managing revisions, packages, Workspace tools, external images, DNS access, and custom images for models and Apps. [Manage Compute Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments)\ Learn how to work with Domino Environments. [Add packages to Environments](/cloud/platform-capabilities/core-concepts/compute-environments/add-packages-to-environments)\ Add a package to the Environment used in a Job, Workspace, or App. [Work with Pluggable Workspaces](/cloud/platform-capabilities/core-concepts/compute-environments/work-with-pluggable-workspaces)\ Leverage a variety of Workspaces based on specific languages, development tools, and software. [Use external images in Domino Environments](/cloud/platform-capabilities/core-concepts/compute-environments/use-external-images)\ Use pre-built images from external catalogs. [Deploy a custom image](/cloud/platform-capabilities/core-concepts/compute-environments/deploy-a-custom-image)\ Use Dockerfile instructions to enable custom images to publish models or host web applications. [Access additional domains and hostnames](/cloud/platform-capabilities/core-concepts/compute-environments/access-additional-domains-and-hostnames)\ Use custom DNS name servers to handle internal or private domain names and URLs. # Best Practices for Domino Environments Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/1-best-practices-domino-environments Manage Domino Environments with clear names, controlled build propagation, smaller images, cached bases, and limited dependency files. ## Domino environments Cumbersome Environment definitions can significantly impact startup times for executions that use that Environment. ### Use clear naming conventions and descriptions **Reason**: A common reason environments get duplicated is that users are unsure if an existing environment meets their needs. Using clear and descriptive names for all environments makes it easier for new users and admins to understand the catalog. This clarity helps make Domino easier to work with and maintain. **Solution**: Keep things clear for everyone by using these tips: * Use clear, descriptive names for your environments. * Enforce a standard of quality in naming and Dockerfile commenting. * Make sure you don’t make a copy of an environment without renaming it. ### Use build propagation to keep environments updated **Reason**: Prevents users from having to manually update environments downstream. **Solution**: Automatically update environments by: * Environments that need to be auto-updated are set to **Active (auto-rebuilds)**. * Testing newly built revisions after updating (ensure **Auto-assign next new revision as Active** is off). * Once you’re happy with the latest revision, set it as **Active**. You should assess the downstream impact in the [Dependency Tree tab](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments#view-accessible-environments) prior to making changes, especially if they trigger a lot of rebuilds. ### Limit global environments **Reason**: Focusing on a few global environments with broad uses is more beneficial than creating many specialized ones. **Solution**: Follow these ideas for limiting global environments: * Use the default compute environment as the base. * Create a global environment and image that meets 80-90% of the community’s requirements. ### Create one environment per team to avoid sprawl **Reason**: When a user asks for a new environment with specific features, consider adding those to an existing global environment instead of making a new environment. Having fewer global environments makes it easier to maintain them. **Solution**: Here are some ideas to keep sprawl to a minimum: * Individual users’ environments should be based on a primary global environment. * Environments should always be based on the latest standard base image. ### Audit and archive environments regularly **Reason**: Avoid sprawl to maintain control of your environments and prevent slow executions. **Solution**: Follow these tips to create a culture of tidiness around environment management: * Share responsibility for environment management. * Clean up old or poorly maintained environments. * Be assertive about pruning unnecessary environments. * Team leads/SMEs are responsible for keeping images up-to-date. * Have few global environments. * If several users need to install something larger than 1G, it may be time to update your base image. * Use Organizations to manage access to restricted environments. ## Building images These are our best practices for building more efficient Docker images. ### Reduce the Environment image size **Reason**: If the environment image needed for a Workspace, Job, or other task is not on the compute node where it runs, it must first be sent over the network from the image registry in a compressed format. After the transfer, the image is then decompressed on the compute node. Transferring and decompressing the image slows startup time, and the delay increases as the image size grows. **Solution**: Follow these tips to minimize the Environment image size: * Choose the smallest base image that suits your needs, either an existing Domino Environment or a custom image. * Install only essential software via the Dockerfile. * Consider creating several smaller, special-purpose Environments rather than one larger, general-purpose Environment. ### Limit dependency file usage **Reason**: Every package listed in a dependency file, like `requirements.txt`, is installed via a network transfer for every execution. This causes startup latency and is vulnerable to network failures. **Solution**: Follow these tips to minimize usage of dependency files: * Move packages from dependency files to the Environment’s Dockerfile. * Packages in the Dockerfile are installed just once during Environment creation. * Eliminate rarely used packages from dependency files. On the rare occasions they are needed, install them manually in the running execution or as part of your execution’s code. ### Cache global environments on the executor machine image **Reason**: If users create environments with base images that differ significantly from what is cached on the machine image, it can take a long time to pull the necessary images when launching executors. **Solution**: To improve the startup time for your users: * Cache your global environments in the executor template machine image so that each new executor starts with the cached base Docker image for any environment. ## Next steps * [Domino Standard Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/2-domino-standard-environments) describes the pre-configured environments that come with Domino. * [Create a Domino Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/3-create-an-environment) using an existing environment or start from a custom setup. * [Edit an Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) to enable tools, run scripts, or manage environment variables. * [Set default Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment) establishes a starting point for all new projects or an environment for a specific project. # Domino Standard Environments Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/2-domino-standard-environments Choose Domino Core, Standard, Cluster, or GPU Environments for Workspaces, Jobs, Apps, endpoints, and distributed compute workloads. Every Domino installation includes the default Domino Core Environment (DCE) and the Domino Standard Environment (DSE) setup. These environments come with pre-configured data science tools and libraries for Domino users. They can be used for any Domino execution, such as a Workspace, Job, App, or Domino endpoint. With each major release, Domino updates its core environments with new libraries and packages. You can still update your core environments with custom libraries and packages. Your Domino administrator can guide you through that process if needed. DCEs are smaller and more straightforward, making them suitable only for the worker nodes in the cluster. DSEs cannot be used for worker nodes in a cluster. ## Domino core environment (DCE) Domino provides a security-focused, smaller-footprint image called the Domino Core Environment (DCE). It includes only the essential packages needed to operate within Domino. This can serve as a base to help you create a Domino-compatible environment from scratch, add only the packages you want to it, and speed up the process of building the environment and initiating executions. The Domino Core Environment supports Jupyter and JupyterLab but lacks some packages available in the Domino Standard Environment (DSE). Domino recommends the DCE for custom package installations on a base image because its smaller size speeds up builds and minimizes conflicts. ## Domino standard environment (DSE) The Domino Standard Environment (DSE) is available with standard libraries and packages. This environment has a much larger image size but many common packages for data scientists. It can handle common data science workflows out of the box and includes the most common Python and R packages. ### FUSE environment option The DSE offers a version that includes FileSystem in Userspace (FUSE) binaries, enabling support for Goofys and SSHFS. You can add these commands to your Dockerfile to enable FUSE functionality: ```dockerfile theme={null} USER root # Goofys ADD https://github.com/kahing/goofys/releases/download/v0.24.0/goofys /usr/bin/ RUN chmod a+x /usr/bin/goofys # SSHFS RUN apt-get update && apt-get install -y sshfs && sed -i "s/^#user_allow_other/user_allow_other/" /etc/fuse.conf USER ubuntu ``` ## Domino cluster environments Domino Cluster Environments work similarly to Domino Standard Environments (DSEs) but include extra libraries for specific cluster types. They offer the same workspace tools and general packages as DSEs to support data science tasks. Each Domino environment is designed specifically for the corresponding compute cluster environments. They are most effective when used in a distributed compute cluster alongside a Domino Compute Cluster Environment. You can use these environments with any Domino execution, such as a Workspace or Job. Here are a few things to remember about clusters in Domino: * All environments must maintain identical Python versions across the cluster. * A cluster won’t work correctly if the worker nodes are not using the appropriate Domino Cluster Environment for cluster workers. * A compatible Domino Compute Environment for Job or Workspace is also needed for proper functionality. The [Compute Environment catalog](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/8-compute-environment-catalog) has a complete list of pre-built compute environments for you to use with Domino. | Type | Description | | - | - | | **Domino Spark Environment** | This includes Scala and Spark, along with the typical features of DSE. [Work with your Spark cluster](/cloud/platform-capabilities/features/compute-clusters-hpc/spark/on-demand-spark/work-with-your-cluster) has complete instructions on creating simple Spark clusters for use with Domino Spark environments. | | **Domino Ray Environment** | This combines Ray features with standard DSE tools. [Create a base Ray cluster environment](/cloud/platform-capabilities/features/compute-clusters-hpc/ray/configure-prerequisites) has complete instructions on creating simple Ray clusters for use with Domino Ray environments. | | **Domino Dask Environment** | This environment includes Dask on top of the typical DSE functionality. [Work with clusters](/cloud/platform-capabilities/features/compute-clusters-hpc/dask/work-with-your-cluster) has complete instructions on creating simple Dask clusters for use with Domino Dask environments. | | **Domino MPI Environment** | Provision and orchestrate an Open MPI cluster directly on the infrastructure backing your Domino deployment. [Distributed GPUs with Open MPI](/cloud/platform-capabilities/features/compute-clusters-hpc/mpi) has complete instructions on enabling and configuring Open MPI on your environment. | ## Domino GPU environments The Domino GPU Environment includes CUDA support and common packages for taking advantage of GPUs. Domino recommends using an Environment with explicit GPU support when using GPU hardware tiers. The [Compute Environment catalog](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/8-compute-environment-catalog) has a complete list of pre-built compute environments for you to use with Domino. ## Next steps * [Create a new Domino Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/3-create-an-environment) to meet your language and package needs. * [Set default Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment) establishes a starting point for all new projects or an environment for a specific project. * The [Compute Environment catalog](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/8-compute-environment-catalog) has information on accessing Domino Environment images. * [Our Best Practices](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/1-best-practices-domino-environments) guide you in setting up and maintaining your Domino environments. # Create a Domino Environment Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/3-create-an-environment Create or duplicate a Domino Environment from a core, existing, or custom image, control revisions and visibility, and declare CPU architectures. This guide shows you three ways to create a new Domino Environment, whether you want to make a core Domino environment, base it on an existing environment, or start from a custom setup. ## Tour the new environment window Create a new Environment 1. **Name**: The name you give your environment. 2. **Description (Optional)**: Use this to record details about your environment. 3. **Base Environment / Image**: These are the options for a base environment/image: 1. **Start from an existing Environment**: Base your new environment on an existing Domino environment. 2. **Active (auto-rebuilds)**: For an existing environment, keep this selected, or choose a specific revision from the menu. 3. **Start from a custom base image**: Input a URI to build a custom environment. 4. **Supported Clusters**: Lists the currently supported types of clusters. 5. **Visibility**: Choose a visibility level: Private, Available to an Organization, or Globally Accessible (admin only). 6. **Revision Behavior**: Auto-assigns the latest revision as active. 7. **Customize before building**: Use this to add custom features to your environment. 8. **Create Environment**: Validates and creates your new environment. ## Create environment based on Domino core environment Domino comes with the [Domino Core Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/2-domino-standard-environments) installed, but you can create a new Domino Environment using the available environment images. 1. Go to **Govern** > **Environments** and click **+ Create Environment**. 2. Fill in the following fields: 1. **Name**: Name your environment according to the naming convention of your organization. 2. **Description (Optional)**: Enter a meaningful description of the environment. For example, you could add details like the OS, Python version, and whether the environment uses Jupyter, JupyterLab, VS Code, etc. 3. Choose **Start from an existing Environment** for your **Base Environment / Image**. 1. The global default for your environment is pre-selected. 2. Scroll until you can select the **Domino Core Environment**. 3. **Active (auto-rebuilds)**: keep this selected, or choose a specific revision from the menu. 4. Choose an option for any **Supported Clusters**. 5. Decide on your environment’s **Visibility** level: **Private**, **Available to an Organization**, or **Globally Accessible** (admin only). 6. Click **Create Environment**. The **Revisions** tab for the environment opens. To customize the environment to enable tools, run scripts, or manage environment variables, click **Customize before Building** and use the [Customize your Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) guide. You can also click **Edit Definition** to customize the environment later. ## Create environment based on existing environment You can create a new Domino Environment by duplicating existing environments, or by choosing a base environment from the **Start from existing environment** menu. After building or editing an environment, use the **Auto-assign next new revision as Active** toggle in the **Revisions** tab to control which revision is active. When enabled, the latest successful build becomes **Active** automatically. When disabled, the environment stays on the current **Active** revision, even as new ones are built. Auto-assign next new revision as Active Suppose your environment updates automatically due to a subscription, but you have locked its **Active** revision to a specific version. In that case, you see a notice when the base environment’s **Active** revision changes. This reminds you to consider updating your environment’s revision. You can keep a chosen version of your environment as **Active** while still receiving updates on the base environment. This lets you test the new version before connecting your Jobs, Apps, and Model Endpoints to it. Please note that archived images are not rebuilt automatically. ### Create environment by duplication To create a new environment by duplicating an existing environment: 1. Go to **Govern** > **Environments**. 2. Choose the environment you want to copy and click the three dots on the right. 3. Choose **Duplicate Environment** from the menu. 4. Rename it by clicking the edit icon and then entering when done. 5. You can edit other fields quickly to customize them: 1. **Edit Description**: Click **Update** when you are done with the description. 2. **Edit Visibility**: Click **Update Visibility** when finished. 6. Click **Customize before building** or **Create Environment**. Use the [Customize your Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) article for guidance to enable tools, run scripts, or manage environment variables. ### Create environment from existing environment When you create a new environment based on an existing one or change the settings of an environment, you have two options for building it: * You can create it based on a specific version of the base environment. You can change this on a later revision of your own. * You can set it to update automatically by linking it to changes in the base environment’s **Active** revision. If the base environment changes its **Active** revision, your environment automatically builds a new revision based off of it. To create a new environment by using an existing environment as the base: 1. Go to **Govern** > **Environments**. 2. Select **Create Environment**. 3. Choose the environment you want to use as the base from the menu. 1. **Active (auto-rebuilds)**: keep this selected, or choose a specific revision from the menu. 4. Name your new environment. 5. **Description (Optional)**: Enter a description of the environment. 6. Choose a **Visibility** level for your environment. 7. Click **Create Environment**. The **Revisions** tab for the environment opens. Use the [Customize your Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) article for guidance to enable tools, run scripts, or manage environment variables. ## Create environment based on custom images Choose your [custom Docker or container image](/cloud/platform-overview/domino-overview) before creating a new environment and copy the URI. 1. Go to **Govern** > **Environments** and click **+Create Environment**. 2. Fill in the following fields: 1. **Name**: Name your environment according to the naming convention of your organization. 2. **Description (Optional)**: Enter a meaningful description of the environment. For example, you could add details like the OS, Python version, and whether the environment uses Jupyter, JupyterLab, VS Code, etc. 3. Choose **Start from a custom base image** for your **Base Environment / Image**. 1. **FROM**: Paste the custom Docker or container image URI here. 2. **Optional**: Review the information about the **Automatically make compatible** field. 4. Choose an option for any **Supported Clusters**. 5. Decide on your environment’s **Visibility** level: **Private**, **Available to an Organization**, or **Globally Accessible** (admin only). 6. Click **Create Environment**. The **Revisions** tab for the environment opens. To customize the environment to enable tools, run scripts, or manage environment variables, click **Customize before Building** and use the [Customize your Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) guide. You can also click **Edit Definition** to customize the environment later. ## Set supported CPU architectures Each environment revision declares the CPU architectures it supports: `amd64`, `arm64`, or both. When an execution starts, Domino checks that the environment supports the CPU architecture of the selected [hardware tier](/cloud/admin/infrastructure-and-compute/manage-compute-resources/hardware-tiers) and rejects the execution if it doesn't. For on-demand clusters, Domino runs the same check against the cluster's head and worker hardware tiers. If a revision doesn't declare architectures, it inherits the architectures declared on its base environment. If neither declares architectures, the revision supports `amd64`, so existing environments keep running on their current hardware tiers. Declare architectures with the v2 environments API: * `POST /api/environments/v2/environments` creates an environment. Set the `architectures` array on the `initialRevision` object. * `POST /api/environments/v2/environments/{environmentId}/revisions` creates a revision of an existing environment. Set the `architectures` array at the top level of the request body. Domino returns a `400` response when the `architectures` array contains a value other than `amd64` or `arm64`. In v2 request bodies, the `dockerfileInstructions`, `preSetupScript`, `postSetupScript`, `preRunScript`, and `postRunScript` fields are nested under a `buildConfiguration` object. The beta environments endpoints are deprecated and don't support architectures. Example request: ```python theme={null} import requests import json url = "https://your-domino-url/api/environments/v2/environments" payload = json.dumps({ "name": "multi-architecture-environment", "visibility": "private", "addBaseDependencies": True, "initialRevision": { "image": "quay.io/example/base-image:latest", "architectures": ["amd64", "arm64"] } }) headers = { 'X-Domino-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` To read the architectures a revision supports, get the environment with `GET /api/environments/v1/environments/{environmentId}` and check the `architectures` array on each revision. ## Archive an environment You can archive environments as long as they are not the default environment for a project. Archiving an environment does not affect reproducibility; executions based on it still run. 1. Go to **Govern** > **Environments**. 2. Choose an environment from the list. 3. There are two ways to archive an environment quickly: 1. You can click the 3 dots within the list and choose **Archive Environment**. 2. Choose **Archive Environment** from the menu. You can also archive from any tab within the **Environment** details. ## Next steps * [Customize your Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) to enable tools, run scripts, or manage environment variables. * [Set default Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment) establishes a starting point for all new projects or an environment for a specific project. * [Our Best Practices](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/1-best-practices-domino-environments) guides you in setting up and maintaining your Domino environments. * [Use AI coding assistants](/cloud/platform-capabilities/features/coding-assistants) to enhance your coding in a Domino Environment. # Use Environment Revision Controls in Domino Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/4-use-environment-revision-controls Control environment inheritance with revision selection, Active revision pinning, automatic activation, and chained build propagation. Domino enables you to manage environment inheritance and revision lifecycles with features such as build propagation, revision pinning, and revision selection. These tools help ensure the automatic propagation of environment updates, allowing for safe testing of changes, and giving you control over which revisions are used across your workflows. This approach improves environment lifecycle management in two key ways: * **Better governance and compliance**, since environment updates can be cascaded through derived environments. * **More reliable automation**, with the ability to test updated environments before production workloads adopt them. Together, these capabilities make it easier to scale, standardize, and maintain reliable environments across teams and projects. ## Prerequisites * You must have permission to create or edit compute environments. * You should be familiar with how base and derived environments work in Domino. ## Step 1: Select a base revision (revision selection) When creating or editing an environment: 1. Go to **Environments** > **Create Environment** or open an existing one. 2. Under **Base Environment**, select a base environment. 3. In the **Revision** dropdown, you can: 1. Choose a specific revision of the base, or 2. Select **Active - auto-rebuild** to subscribe to the base’s current Active revision. Choosing **Active - auto-rebuild** enables build propagation. Any change to the Active revision of the base environment triggers an automatic rebuild of this environment. ## Step 2: Manage automatic activation of revisions (revision pinning) You can control whether the latest revision becomes Active automatically or if activation must be manual. **When creating a new environment**\ In the setup form, check or uncheck **Auto-assign latest revision as Active**: * **Checked:** New revisions are automatically set to Active. * **Unchecked:** You must manually activate revisions (that is, the Active revision is pinned). **For existing environments**\ If using build propagation, uncheck this option to avoid automatically activating new, untested revisions: 1. Go to the **Revisions** tab. 2. Uncheck **Auto-assign latest revision as Active** to pin the current Active revision. 3. Manually promote future revisions when ready. ## Step 3: Use build propagation If you selected **Active - auto-rebuild** in Step 1: * Any time the base environment’s Active revision changes, a new revision of your environment is built automatically. * If the environment has **Auto-assign latest revision as Active** toggled **on**, this new revision becomes Active. * If the environment has **Auto-assign latest revision as Active** toggled **off** (that is, the Active revision is pinned), the new revision must be activated manually. If the environment has **Auto-assign latest revision as Active** toggled **on**, the new auto-rebuilt revision is automatically set to Active and consequently propagates builds to any of its subscribed environments. This way you can achieve chained propagation across multiple levels of environment inheritance. ## Next steps * [Customize an Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) to enable tools, run scripts, or manage environment variables. * [Set a default Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment) to address particular package or IDE requirements. * Use [AI coding assistants](/cloud/platform-capabilities/features/coding-assistants) in a Domino Environment. * [Manage Environment variables](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables) to help configure how the system runs and manage secrets or settings across different areas. # Customize your Environment Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition Customize an Environment with Dockerfile instructions, Workspace tools, setup and run scripts, variables, VPN networking, and revision notes. You can customize an environment to enable tools, run scripts, or manage environment variables. You may need to be an administrator to edit an existing environment. * Click **Customize before Building** if you just created an Environment and want to enable tools, run scripts, or manage environment variables. * To edit an existing Environment, go to **Govern** > **Environments** in the navigation pane and click the name of an Environment. Then click **Edit Definition**. ## Order of script execution Domino runs setup scripts before and after running the `requirements.txt` file. The scripts within an environment are executed in the following order: * First, it executes **pre-setup scripts**. * Next, it installs packages from the `requirements.txt` file. * Then Domino runs **post-setup** and **pre-run scripts**. * **Post-run scripts** are executed after your Workspace, Job, or App is stopped. However, no scripts are run before or after tasks in a distributed compute cluster environment, such as Spark, Ray, Dask, or MPI. ## Define your environment Before you add items to these scripts and the `requirements.txt` file, think about whether similar instructions should be included directly in the environment’s Dockerfile. This can make it faster to start workspaces, jobs, and other tasks using the environment because the necessary work is already included in the Docker image. Domino Environment Overview Tab You can start by going to **Govern** > **Environments** and selecting the environment you want to define from the list. Then click **Edit Definition**. On the **Overview** tab, you can update the **Description** or change the environment’s Visibility. You won’t be able to change the **Environment Base** or **Supported Cluster Settings**. ### Dockerfile instructions Enter your Dockerfile layers. Some things to remember: * Exclude the `FROM` statement. * Commands can be run as root or other user available in the base image. * Docker can’t access your project files or user environment variables when building. * There is a limit of 127 layers. [Docker’s official site](https://docs.docker.com/engine/reference/builder/) has more detailed information about Docker. ### Pluggable Workspace tools Enter the interactive tools needed by any Project that uses this Environment. [Add Workspace IDEs](/cloud/platform-capabilities/core-concepts/compute-environments/work-with-pluggable-workspaces/add-workspace-ides) has more information about interactive tools. ### Run setup scripts Enter the `bash` code that is executed at runtime. Domino executes these commands at runtime and runs them as root. * **Pre Run Script**: Enter commands to execute before the Python packages in your Project’s `requirements.txt` are installed. * **Post Run Script**: Enter commands to execute after your Workspace/Job/App is stopped. ### Environment variables Set the **Variable Names** and their **Values**. ### Advanced In the advanced section, enter the `bash` code executed at a specified step in your experiment’s lifecycle. * **Pre Run Script**: Enter commands to execute before installing Python packages in your Project’s `requirements.txt`. * **Post Run Script**: Enter commands to execute after the Python packages in your Project’s `requirements.txt` are installed. * **Enable VPN Networking**: Select this if a VPN is to be used for that environment. ### Revision history Enter a short description of the changes to the Environment. ## Next steps * [Our Best Practices](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/1-best-practices-domino-environments) guides you in setting up and maintaining your Domino environments. * [Use Domino’s environment variables](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables) to store keys and credentials or to inject values into your runs. * [Create a Domino Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/3-create-an-environment) using an existing environment or start from a custom setup. * [Set default Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment) establishes a starting point for all new projects or an environment for a specific project. # Set a default Environment Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment Set a Project's default Compute Environment so new Jobs and Workspaces start with the required packages, tools, and IDE configuration. You can set a project-specific environment as the default for your project. This might address particular package or IDE requirements. The project owner can choose the default environment for that project. When you launch a job or create a new workspace, Domino automatically populates the fields with the compute environment defaults from the project’s settings. ## Set default environment for a project Adjust the project’s Compute Environment settings to replace the global default with one tailored to your project’s specific needs: 1. Go to **Develop** > **Projects**. 2. Choose the project that you want to set a default environment for. 3. In the navigation pane, click **Settings** > **Hardware & Environment**. 4. From **Compute Environment**, select the environment you want to use as the default for your project. 5. Click **Manage Environment** to see your environment’s details. ## Next steps * [Our Best Practices](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/1-best-practices-domino-environments) guides you in setting up and maintaining your Domino environments. * [Create a Domino Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/3-create-an-environment) using an existing environment or start from a custom setup. * [Edit an Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) to enable tools, run scripts, or manage environment variables. * [Use AI coding assistants](/cloud/platform-capabilities/features/coding-assistants) to enhance your coding in a Domino Environment. # Compute Environment Catalog Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/8-compute-environment-catalog Find registry paths for Domino Core, Standard, Minimal, GPU, and cluster environments, plus partner images for MATLAB, NVIDIA, Intel, and Stata. Domino is an open platform for data science which integrates various languages, IDEs, data sources, and tools in one place. You can add various environments to any Domino installation by visiting quay.io. Download the image from the URL link to the repository. Our documentation provides instructions for setting up these environments. You can also use Domino to automatically adjust Docker images so they work with Domino Workspaces and Jobs. You can find more information, including the requirements for these images, in [Use External Images in Domino Environments](/cloud/platform-capabilities/core-concepts/compute-environments/use-external-images).
Partner Product/Version
Domino logo
Domino Standard Environment (DSE)
quay.io/domino/domino-standard-environment:develop.1197facc
Domino logo
Domino Core Environment (DCE)
quay.io/domino/domino-core-environment:develop.1197facc
Domino logo
Domino Minimal Environment (DME)
quay.io/domino/domino-minimal-environment:develop.1197facc
Domino logo
Domino GPU Environment (DGE)
quay.io/domino/domino-gpu-environment:develop.1197facc
Domino logo
Domino Spark Environment
quay.io/domino/domino-spark-environment:develop.1197facc
quay.io/domino/spark-cluster-environment:develop.1197facc
Domino logo
Domino Dask Environment
quay.io/domino/domino-dask-environment:develop.1197facc
quay.io/domino/dask-cluster-environment:develop.1197facc
Domino logo
On-Demand Open MPI
quay.io/domino/mpi-cluster-environment:develop.1197facc
quay.io/domino/domino-mpi-environment:develop.1197facc
Domino logo
Domino Standard Environment without Coding Assistants
quay.io/domino/domino-standard-environment-no-assistants:develop.1197facc
Intel AI logo
Intel AI Analytics Toolkit (AI Kit)
intel/oneapi-aikit
MATLAB logo
MATLAB 2021a
quay.io/domino/matlab:R2021a
MATLAB logo
MATLAB 2020b
quay.io/domino/matlab:R2020b
MATLAB logo
MATLAB 2020a
quay.io/domino/matlab:R2020a
MATLAB logo
MATLAB 2019b
quay.io/domino/matlab:R2019b
NVIDIA NGC logo
Container images from the NVIDIA NGC Catalog
Domino logo
Domino Ray Environment
quay.io/domino/domino-ray-environment:develop.1197facc
quay.io/domino/ray-cluster-environment:develop.1197facc
quay.io/domino/ray-cluster-gpu-environment:develop.1197facc
Snowflake logo
Snowflake Snowpark
quay.io/domino/snowflake:snowpark-latest
Stata logo
Stata 17
quay.io/domino/stata:17
# Manage Compute Environments Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/index Manage Docker-based Compute Environments, inspect revisions and dependency trees, control access, and choose images for each execution. Domino Environments, or Compute Environments, help teams manage their projects better. They improve processes in MLOps, generative AI, and data science workflows. In Domino, environments are defined by Docker images that create isolated containers for each execution unit including Workspaces, Runs, Apps, and Models. This setup allows professionals to experiment and customize their work in a contained, versioned, and shareable space, boosting reproducibility and collaboration. ## Basics of Domino environments You can create environments, use those provided by Domino, or modify existing ones. You might choose to create or alter an environment if: * You must install a package for Python, R, Octave, or some other software dependency. * You want to cache a package or library so that it’s immediately available when you start a run. * You manage an organization and want to create a default Environment for all projects. Domino has two main types of Compute Environments: the Domino Standard Environment (DSE) and the Domino Minimal Environment (DME). The DSE offers a complete set of libraries and packages, while the DME is lighter and includes fewer packages. Domino also provides Cluster Environments, which work like DSEs but are designed for specific types of clusters. The environments are smaller and simpler, suitable only for worker nodes in a cluster, while DSEs cannot be used for worker nodes. ## View accessible environments You can view the environments that you can access by clicking **Govern** > **Environments** in the navigation bar. In the **Environments Overview** page, you can see a list of: * Global Environments. * Specific environments used by Projects you [collaborate](/cloud/platform-capabilities/core-concepts/projects/collaborate-on-projects) on. * Environments shared with [organizations](/cloud/platform-capabilities/features/collaboration/manage-organizations) you belong to. To switch from the default *table* view to the *tree* view, use the selector on the top right, below the **+ Create Environment** button. The tree view allows you to see hierarchical relationships between environments, collapse and expand nodes with children, view environment metadata, and filter by visibility. Tree view of Environments To see more details about an environment, click that environment’s name. Environment Overview Pane
Field Description

Overview

The Overview tab lists all metadata about your environment or image. If your environment is built on top of another, you may need to click through to the parent environment before seeing the underlying Docker image. Click Edit Definition if you need to make changes to your environment.

Revisions

All revisions of your compute environment are listed here, along with their build status, timestamp, and Docker image URI. Each saved change increments the revision number by one. By default, the latest successfully built revision is automatically set as Active. If you’d like to keep a specific revision active instead, you can disable the Auto-assign next new revision as Active toggle to lock your chosen revision in place. Domino rebuilds the environment and pushes the resulting image to the local Docker registry. By default, the latest successfully built revision becomes the Active revision.

The list also indicates whether a revision was built automatically via build propagation, and includes metadata about its parent revision: specifically, which revision it was derived from and whether that parent is currently Active. This context helps track inheritance chains and understand how updates cascade across environments.

Revision details

Click the three vertical dots for additional options like viewing build logs, downloading an image source project, or canceling builds.

Projects

These are listed after being assigned to an environment. You can view details of the project by clicking its name.

Endpoints

Shows you a list of endpoints for that environment, including the status of the endpoint.

Dependency Tree

The Dependency Tree view is similar to the global tree view, except that it only displays the subtree of the selected environment, with it as its only root node. By default, only the descendants that would receive automatic downstream rebuilds are shown. The Include non-auto-rebuilding toggle allows you to see all descendants.

## Next steps * [Our Best Practices](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/1-best-practices-domino-environments) guides you in setting up and maintaining your Domino environments. * [Domino Standard Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/2-domino-standard-environments) describes the pre-configured environments that come with Domino. * [Create a Domino Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/3-create-an-environment) using an existing environment or start from a custom setup. * [Use Environment Revision Controls in Domino](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/4-use-environment-revision-controls) to manage environment inheritance and revision lifecycles. * [Customize your Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) to enable tools, run scripts, or manage environment variables. * [Set default Environments](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/6-set-a-default-environment) establishes a starting point for all new projects or an environment for a specific project. * [Compute Environment Catalog](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/8-compute-environment-catalog) provides images to add various environments to any Domino installation. * [Manage environment variables](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables) to configure how the system runs and manage secrets or settings across different areas. # Connect to DataRobot Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/access-external-data-directly/connect-to-datarobot Connect directly to DataRobot by installing a versioned Python client in a Domino Environment and confirming network connectivity. This topic describes how to connect directly to DataRobot from Domino. You must have network connectivity between DataRobot and your Domino deployment. Use the following commands to install the DataRobot Python client in the Dockerfile instructions section of your environment: ```dockerfile theme={null} RUN pip install "datarobot==" ``` ## Next steps * [Access external data directly](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly): the general procedure, including where to store credentials. * Compare direct connections with [Domino Data Source connectors](/cloud/platform-capabilities/core-concepts/data/data-source-connectors) for supported data stores. # Connect to Impala Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/access-external-data-directly/connect-to-impala Connect directly to Apache Impala with Cloudera's ODBC driver and pyodbc, store Kerberos settings as variables, and configure SSL when needed. This topic describes how to connect directly to Apache Impala from Domino. You must have network connectivity between Impala and your Domino deployment. Domino does not officially support this method. We provide this information as a courtesy. ## Use Impala ODBC connector for Cloudera Enterprise with pyodbc Domino recommends using the Impala ODBC Connector for Cloudera Enterprise in concert with the pyodbc library for interacting with Impala from Python. ### Environment setup 1. Visit the Cloudera downloads page to download the Impala ODBC Connector for Cloudera Enterprise to your local machine. For default Domino images of Ubuntu 16.04, download the 64-bit Debian package. Keep track of where you save this file, as you need it in a later step. Cloudera ODBC Connector 2. Create a new *public* project in your Domino instance to host the driver files for use in Domino environments. Create Project modal with Visibility set to Public 3. In the new project, click **browse for files** and select the driver file you downloaded earlier to queue it for upload. Click **Upload** to add it to the project. Upload the driver 4. After the driver file has been added to your project files, click the gear next to it in the files list, then right-click **Download** and click **Copy link address**. Save this address as you need it when setting up your environment. Copy the link address 5. Add the following Dockerfile instructions to install the driver and pyodbc in your environment, pasting the URL you copied earlier where indicated on line 5. ```dockerfile theme={null} USER root # download the driver from your project RUN mkdir /ref_files RUN cd /ref_files && wget --no-check-certificate [paste-download-url-from-previous-step-here] && gzip -d clouderaimpalaodbc_2.6.0.1000-2_amd64.deb.gz # install the driver RUN gdebi /ref_files/clouderaimpalaodbc_2.6.0.1000-2_amd64.deb --n # update odbc.ini file for impala driver RUN echo " [Cloudera ODBC Driver for Impala] Driver=/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so KrbFQDN=_HOST KrbServiceName=impala " >> /etc/odbcinst.ini # set up impala libraries RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cloudera/impalaodbc/lib/64 RUN ldd /opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so # install pyodbc RUN pip install pyodbc USER ubuntu ``` ### Credential setup Set up the following Domino environment variables to store secure information about your Impala connection. * `IMPALA_HOST` Hostname where your Impala service is running. Make sure your Impala service and network firewall are configured to accept connections from Domino. * `IMPALA_PORT` The port your Impala service is configured to accept connections on. * `IMPALA_KERB_HOST` Hostname of your Kerberos authentication service. * `IMPALA_KERB_REALM` The name of the Kerberos realm used by the Impala service. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. ### Usage See the pyodbc documentation for detailed information about how to use the package to interact with a database. The following are some examples for how to set up a connection. ```python theme={null} import pyodbc import os # fetch values from environment variables hostname = os.environ['IMPALA_HOST'] service_port = os.environ['IMPALA_PORT'] kerb_host = os.environ['IMPALA_KERB_HOST'] kerb_realm = os.environ['IMPALA_KERB_REALM'] # create connection object conn = pyodbc.connect('Host=hostname;' +'DRIVER={Cloudera ODBC Driver for Impala};' +'PORT=service_port;' +'KrbRealm=kerb_realm;' +'KrbFQDN=kerb_host;' +'KrbServiceName=impala;' +'AUTHMECH=1',autocommit=True) # if you see: # 'Error! Filename not specified' # while querying Impala using the connection object, # add the following configuration line: # # conn.setencoding(encoding='utf-8', ctype=pyodbc.SQL_CHAR) # if your Impala uses SSL, add SSL=1 to the connection string # conn = pyodbc.connect('Host=hostname;' # +'DRIVER={Cloudera ODBC Driver for Impala};' # +'PORT=service_port;' # +'KrbRealm=kerb_realm;' # +'KrbFQDN=kerb_host;' # +'KrbServiceName=impala;' # +'AUTHMECH=1;' # +'SSL=1;' # +'AllowSelfSignedServerCert=1', autocommit=True) ``` ## Next steps * [Access external data directly](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly): the general procedure, including where to store credentials. * Compare direct connections with [Domino Data Source connectors](/cloud/platform-capabilities/core-concepts/data/data-source-connectors) for supported data stores. # Access external data directly Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/access-external-data-directly/index Connect Domino code directly to APIs, databases, and network file stores by installing clients, storing credentials, and fetching data. The best way to connect to an external data store from Domino is to use a Domino connector to [create a Domino data source](/cloud/platform-capabilities/core-concepts/data/data-source-connectors). However, you also have the option to connect to an external data store directly from a Domino application. Because Domino can run any user-produced code, you can always execute code that connects to any data source you wish. As long as the Domino executor machines have network connectivity to your data, Domino runs the code. Direct access to external data. Common use cases for directly accessing external data include pulling data from APIs, accessing a database without going through a Domino connector, or accessing a network-based file store without going through an External Data Volume (EDV). The general procedure is as follows: 1. Install the package for the data store in your environment or in your workspace session. See [Add packages to environments](/cloud/platform-capabilities/core-concepts/compute-environments/add-packages-to-environments). 2. Set up the credentials for the data store. Be sure to store your credentials securely and use environment variables to access them in your code. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables). 3. Fetch data from the data store. The method for fetching data depends on the data store. The following data sources are not supported by a Domino Data Source connector, but you can still connect directly to these data sources. Domino does not provide support for any issues related to direct connections. * [DataRobot](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly/connect-to-datarobot) * [Impala](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly/connect-to-impala) # Connect to Amazon S3 Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-amazon-s3 Create and authenticate an Amazon S3 Data Source, or connect with AWS credentials through public URLs, the AWS CLI, boto3, or R's aws.s3 package. This topic describes how to connect to [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) from Domino. You must have network connectivity between S3 and your Domino deployment. The easiest way to connect to an Amazon S3 instance from Domino is to create a Domino Data Source as described below. Administrators can create a Data Source for [tabular S3 with AWS Glue](https://docs.aws.amazon.com/athena/latest/ug/data-sources-glue.html). See the [Admin Guide](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) for details. ## Create an Amazon S3 Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Amazon S3**. 4. Enter the **Bucket**. 5. Optional: Enter a **Subfolder Path**, such as `myFolder` or `data/tests`, to restrict the Data Source to only list data from and write to the specified folder. 6. Enter the **Region**. 7. Enter the **Data Source Name**. 8. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 9. Click **Next**. 10. Enter the credentials to authenticate to S3. By default, Domino supports basic authentication; the Domino secret store backed by HashiCorp Vault securely stores the credentials. If your administrator enabled it, [IAM credential propagation](/cloud/admin/data-administration/external-data#iam-authentication-for-aws-data-sources) might be available. IAM-authenticated connections can be used only to execute jobs and workspaces. Other execution types, such as scheduled jobs and Domino endpoints, require basic authentication. 11. Click **Test Credentials**. 12. If the Data Source authenticates, click **Next**. 13. Select who can view and use the Data Source in projects. 14. Click **Finish Setup**. ## Alternate way to connect to an Amazon S3 Data Source This section describes an alternate method to connect to . Domino does not officially support this method. Use one of the following methods to authenticate with S3 from Domino. Both follow the common naming convention of environment variables for AWS packages so you don’t have to explicitly reference credentials in your code. ### Set up credentials 1. Use a short-lived credential file obtained through Domino’s AWS Credential Propagation feature. After your administrator configures this feature, Domino automatically populates any Run or Job with your AWS credentials file. These credentials are periodically refreshed throughout the Workspace duration to ensure they don’t expire. Following common AWS conventions, you see an environment variable `AWS_SHARED_CREDENTIALS_FILE` which contains the location of your credential files which are stored at `/var/lib/domino/home/.aws/credentials`. Learn more about [using a credential file with the AWS SDK](https://aws.amazon.com/blogs/security/a-new-and-standardized-way-to-manage-credentials-in-the-aws-sdks/). 2. Store your AWS access keys securely as environment variables. To connect to the S3 buckets to which your AWS account has access, enter your [AWS Access Key and AWS Secret Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) to the AWS CLI. By default, AWS utilities [look for these in your environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-environment.html). Set the following as Domino environment variables on your user account: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. ### Get a file from an S3-hosted public path 1. If you have files in S3 that are set to allow public read access, use [Wget](https://en.wikipedia.org/wiki/Wget) from the OS shell of a Domino executor to fetch the files. The request for those files looks similar to the following: ```bash theme={null} wget https://s3-.amazonaws.com// ``` This method is simple but doesn’t require authentication or authorization. Do not use this method with sensitive data. ### AWS CLI 1. Use the [AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/index.html#cli-aws) for a secure method to read S3 from the OS shell of a Domino executor. Making the AWS CLI work from your executor, install it in your environment and enter your credentials. 2. Get the AWS CLI as a Python package from [pip](https://pypi.org/project/pip/). 3. Use the following Dockerfile instruction to install the CLI and automatically add it to your system PATH. You must have [pip](https://pypi.org/project/pip/) installed. ```dockerfile theme={null} USER root RUN pip install awscli --upgrade USER ubuntu ``` 4. After your Domino environment and credentials are set up, fetch the contents of an S3 bucket to your current directory by running: ```bash theme={null} aws s3 sync s3:// . ``` 5. If you are using an AWS credential file with multiple profiles, you might need to specify the profile. (The `default` profile is used if none is specified.) ```bash theme={null} aws s3 sync s3:// . --profile ``` See the [official AWS CLI documentation](https://docs.aws.amazon.com/cli/latest/reference/s3/index.html) on S3 for more commands and options. ### Python and boto3 1. To interact with AWS services from Python, Domino recommends [boto3](https://aws.amazon.com/sdk-for-python/). 2. If you’re using a [Domino Standard Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/2-domino-standard-environments), boto3 is already installed. If you want to add boto3 to an environment, use the following Dockerfile instructions. This instruction assumes you already have [pip](https://pypi.org/project/pip/) installed. ```dockerfile theme={null} USER root RUN pip install boto3 USER ubuntu ``` 3. To interact with S3 from boto3, see [the official boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html). The following is an example of downloading a file where: * You have set up your credentials as instructed above * Your account has access to an S3 bucket named `my_bucket` * The bucket contains an object named `some_data.csv` ```python theme={null} import boto3 import io import pandas as pd # Create a new S3 client client = boto3.client('s3') # Download some_data.csv from my_bucket and write to ./some_data.csv locally file = client.download_file('my_bucket', 'some_data.csv', './some_data.csv') ``` Alternatively, for users using a credential file, use the following code: ```python theme={null} import boto3 # Specify your profile if your credential file contains multiple profiles session = boto3.Session(profile_name='') # Specify your bucket name users_bucket = session.resource('s3').Bucket('my_bucket') # 'list' bucket should succeed for obj in users_bucket.objects.all(): print(obj.key) # Download a file users_bucket.download_file('some_data.csv', './some_data.csv') ``` This code does not provide credentials as arguments to the client constructor, since it assumes: * Credentials are automatically populated at `/var/lib/domino/home/.aws/credentials` as specified in the environment variable `AWS_SHARED_CREDENTIALS_FILE` * You have already set up credentials in the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. After running the previous code, a local copy of *some\_data.csv* exists in the same directory as your Python script or notebook. You can load the data into a [pandas](https://pandas.pydata.org/) dataframe. ```python theme={null} df = pd.read_csv('some_data.csv') ``` See [Use Datasets and Snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots) to learn how to make files available to code in Domino. ### R and aws.s3 1. To connect to S3 from R, Domino recommends the [cloudyr project’s](https://cloudyr.github.io/) package called [aws.s3](https://github.com/cloudyr/aws.s3). 2. If you’re using a [Domino Standard Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/2-domino-standard-environments), aws.s3 is already installed. To add aws.s3 to an environment, use the following Dockerfile instructions. ```dockerfile theme={null} USER root RUN R -e 'install.packages(c("httr","xml2"), repos="https://cran.r-project.org")' RUN R -e 'install.packages("aws.s3", repos = c("cloudyr" = "http://cloudyr.github.io/drat"))' USER ubuntu ``` 3. For basic instructions about using aws.s3 see the [package README](https://github.com/cloudyr/aws.s3/blob/master/README.md). The following is an example of downloading a file where: * You have set up the environment variables with credentials for your AWS account * Your account has access to an S3 bucket named `my_bucket` * The bucket contains an object named `some_data.csv` ```r theme={null} # Load the package library("aws.s3") # If you are using a credential file with multiple profiles. Otherwise, this can be excluded. Sys.setenv("AWS_PROFILE" = "") # Download some_data.csv from my_bucket and write to ./some_data.csv locally save_object("some_data.csv", file = "./some_data.csv", bucket = "my_bucket") ``` 4. After running the previous code, a local copy of *some\_data.csv* exists in the same directory as your R script or notebook. Read from that local file to work with the data it contains. ```r theme={null} myData <- read.csv(file="./some_data.csv", header=TRUE, sep=",") View(myData) ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Amazon S3 Tabular with AWS Glue Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-amazon-s3-with-aws-glue Use an administrator-created Amazon S3 Tabular Data Source with AWS Glue in a Project, then access and share it through standard Data Source workflows. Administrators can create a Data Source for [tabular S3 with AWS Glue](https://docs.aws.amazon.com/athena/latest/ug/data-sources-glue.html). See the [Admin Guide](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) for details. After your administrator has created the Data Source, you can [work with it in your project](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Azure Blob Storage Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-azure-blob-storage Create an Azure Blob Storage Data Source with an account, container, access key, and access permissions, then test its credentials in Domino. Azure Blob Storage stores massive amounts of unstructured object data, such as text or binary data. Domino Data Sources is the easiest way to connect to Azure Blob Storage from Domino. ## Create an Azure Blob Storage Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Azure Blob Storage**. 4. Enter unique names for the account, container, and Data Source. Optionally, enter a **Description** to explain the purpose of the Data Source to others. 5. Enter your Azure Blob Storage [Access Key](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys). The Domino secret store backed by HashiCorp Vault securely stores the credentials. 6. Click **Test Credentials** to validate authentication. 7. Select who can view and use the Data Source in Projects. 8. Click **Finish Setup**. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Azure Data Lake Storage Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-azure-data-lake-storage Create an Azure Data Lake Storage Data Source with an account, container, and access key, then test credentials and set who can use it. Azure Data Lake Storage (ADLS) is a cloud-based data-warehouse. This topic describes how to connect to [account access keys](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys) from Domino. You must have network connectivity between Azure Data Lake Storage and your Domino deployment. The easiest way to connect to a Azure Data Lake Storage instance from Domino is to create a Domino Data Source as described below. ## Create an ADLS Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **ADLS** for **Azure Data Lake Store**. 4. Enter the unique storage account name in **Account Name**. 5. Enter the name of the **Container**. 6. Enter the **Data Source Name**. 7. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 8. Click **Next**. 9. Enter your [Access Key](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys) to connect to Azure Data Lake Storage. The Domino secret store backed by HashiCorp Vault securely stores the credentials. 10. Click **Test Credentials**. 11. If the Data Source authenticates, click **Next**. 12. Select who can view and use the Data Source in projects. 13. Click **Finish Setup**. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to BigQuery Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-bigquery Create a BigQuery Data Source with a project ID and JSON private key, or use an unsupported direct Python connection with a service account. Domino can connect to and query any common database, including Google BigQuery. The easiest way to connect to a [Google BigQuery](https://cloud.google.com/bigquery/) instance from Domino is to create a Domino Data Source as described below. You must have network connectivity between BigQuery and your Domino deployment. ## Create a BigQuery Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Google BigQuery**. 4. Optional: Enter the unique identifier for your project in **GCP Project ID**. 5. Enter the **Data Source Name**. 6. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 7. Click **Next**. 8. Copy your **Private Key (JSON format)**. See [creating a service account](https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account) for instructions about creating a service account and downloading the JSON credentials file. You must copy the entire content of the file. The Domino secret store backed by HashiCorp Vault securely stores the credentials. 9. Click **Test Credentials**. 10. When your Data Source authenticates, click **Next**. 11. Enter the users and organizations who can view and use the Data Source in projects. 12. Click **Finish Setup**. The BigQuery setup ## Alternate way to connect to a Google BigQuery Data Source You can use the [BigQuery API](https://cloud.google.com/bigquery/docs/reference/libraries-overview) to query any Dataset and table to which you have access, whether it’s public or private, by authenticating with your Google Cloud private key. This section describes an alternate method to connect to . Domino does not officially support this method. 1. Go to Google’s Service Accounts page. Select a previous project or create a new project. Select a project If you selected **Create**, the New Project page opens: Create a new project 2. **Create a Service account** for your project. Create a service account 3. Define the access that the Service account must have to BigQuery. See [Google’s Access Control documentation](https://cloud.google.com/bigquery/docs/access-control) for more information. Define the access 4. Confirm that your Service account has been created. New service account has been created 5. On the Service Accounts page, create a new key. Create a new key 6. Download the JSON key and keep it in a safe place. You use this key later to programmatically authenticate to Google. Obtain the JSON key 7. To enable the BigQuery API, click the **Google APIs** logo. Click the Google APIs logo 8. In the Library page, select the **Big Query API**. Select BigQuery API 9. If it is not enabled, click **Enable**. Enable the BigQuery API ### Activate your credentials from Domino Google Cloud uses the [Google Cloud SDK](https://cloud.google.com/sdk/) to activate your credentials. This is already installed in the Domino Default environment. Execute the following bash command: ```shell theme={null} /home/ubuntu/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file ``` For example: ```shell theme={null} /home/ubuntu/google-cloud-sdk/bin/gcloud auth activate-service-account big-query-example@example-big-query-170823.iam.gserviceaccount.com --key-file key.json ``` You can use a custom Domino compute environment and enter this command in Domino pre-setup script to activate the credentials before each run. Otherwise, you can execute them in workspace sessions. See [how to store your credentials securely](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables). ### Authenticate and query using Python You need the `gcloud` and `oauth2client==1.4.12` Python packages. Use the following package to install them in your custom Domino compute environment or in your workspace session. ```shell theme={null} pip install --user gcloud oauth2client==1.4.12 ``` Use the following code to authenticate your Google credentials and query a public BigQuery table: ```python theme={null} from oauth2client.client import GoogleCredentials from googleapiclient.discovery import build # Grab the application's default credentials from the environment. credentials = GoogleCredentials.get_application_default() # Construct the service object for interacting with the BigQuery API. bigquery_service = build('bigquery', 'v2', credentials=credentials) query_request = bigquery_service.jobs() query_data = { 'query': ( 'SELECT TOP(corpus, 10) as title, ' 'COUNT(*) as unique_words ' 'FROM [publicdata:samples.shakespeare];') } query_response = query_request.query( projectId='example-big-query-170823', # Substitute your ProjectId body=query_data).execute() print('Query Results:') for row in query_response['rows']: print(' '.join(field['v'] for field in row['f'])) ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to ClickHouse Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-clickhouse Use an administrator-created ClickHouse Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Databricks Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-databricks Connect to a Databricks cluster or SQL warehouse through a Data Source, or configure the Databricks SDK and authentication in a Workspace. Learn how to connect to a [Databricks Cluster](https://docs.databricks.com/en/clusters/index.html) or [Databricks SQL Warehouse](https://docs.databricks.com/en/sql/admin/create-sql-warehouse.html) from Domino. ## Create a Databricks Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Databricks**. 4. Enter the server **Host**, **Port**, and cluster/warehouse **HTTP Path**. Details on where to find these can be found on the [Databricks Documentation](https://docs.databricks.com/en/integrations/compute-details.html). The host should not contain the protocol. For example, a valid host format is "name.cloud.databricks.com". 1. Optional: Enter the initial Catalog and/or Schema to use for this session. If you include schema, you may need to include the corresponding catalog so it can be identifiable. 5. Enter the Data Source **Name** and a **Description** to explain the purpose of the Data Source to others. 6. Enter your **Personal Access Token** to connect to Databricks. The Domino secret store backed by HashiCorp Vault securely stores the credentials. If this Personal Access Token expires after you created the Data Source, you can generate a new Personal Access Token on Databricks and edit this field with the new value. 7. Click **Test Credentials** to validate the authentication. 8. Select who can view and use the Data Source in projects. 9. Click **Finish Setup**. If your users have Domino permissions to use the Data Source and enter their credentials, they can now use the Domino Data API to retrieve data with the connector. See [Retrieve data](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) for more information. ## Connect using the Databricks SDK Domino recommends that you connect to Databricks using Data Sources to take advantage of flexible access controls, the [Domino Data API](/cloud/reference/api/data_api), and receive technical support. However, you can also connect using the [Databricks SDK](https://docs.databricks.com/en/dev-tools/sdk-python.html) if your business requires it. This SDK allows for Databricks workspace and compute management among other data operations. ### Prepare your Workspace environment * Ensure you have a workspace environment that uses a Python compatible [workspace IDE](/cloud/platform-capabilities/core-concepts/compute-environments/work-with-pluggable-workspaces/add-workspace-ides) like Jupyter Notebook. * Add Python 3.8 or above and the Databricks SDK package "databricks-sdk" to the environment. For more information, please see [Add Packages to Environments](/cloud/platform-capabilities/core-concepts/compute-environments/add-packages-to-environments). You may want to use the [Domino Standard Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/2-domino-standard-environments) base image as a starting environment, which is compatible with Python workspace IDEs and contains a Python version above 3.8. ### Databricks authentication 1. Set up a [Databricks configuration profile](https://docs.databricks.com/en/dev-tools/auth.html#config-profiles). 2. Add the ".databrickscfg" file mentioned in the link above to your project. 3. Set the DATABRICKS\_CONFIG\_PROFILE [environment variable](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables) to be the name of the custom configuration profile you want to use. 4. Launch your workspace. 5. Add the following lines at the top of your code file: ```python theme={null} from databricks.sdk import WorkspaceClient w = WorkspaceClient() ``` Alternatively, set environment variables for your workspace using your Databricks workspace host, token, and any other relevant configurations. Pass them in as parameters when calling the WorkspaceClient function: ```python theme={null} from databricks.sdk import WorkspaceClient w = WorkspaceClient( host = MY_HOST_VARIABLE, token = MY_TOKEN_VARIABLE ) ``` The Databricks SDK is ready to be used in your workspace. For more information, please see the [Databricks SDK documentation](https://databricks-sdk-py.readthedocs.io/en/latest/). ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Druid Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-druid Use an administrator-created Druid Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Google Cloud Storage Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-gcs Create a Google Cloud Storage Data Source for a bucket with a service account private key, then test credentials and assign access. This topic describes how to connect to [Google Cloud Storage (GCS)](https://cloud.google.com/storage/) from Domino. You must have network connectivity between GCS and your Domino deployment. The easiest way to connect to a GCS instance from Domino is to create a Domino Data Source as described below. ## Create a Google Cloud Storage Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **GCS** for **Google Cloud Storage**. 4. Enter the name of the **Bucket**. 5. Enter the **Data Source Name**. Although Google Cloud allows storage bucket names that include underscores, Domino only allows lowercase letters, numbers, periods, and hyphens. 6. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 7. Click **Next**. 8. Copy the **Private Key (JSON format)**. See [creating a service account](https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account) for instructions about creating a service account and downloading the JSON credentials file. You must copy the entire content of the file. The Domino secret store backed by HashiCorp Vault securely stores the credentials. 9. Click **Test Credentials**. 10. If the Data Source authenticates, click **Next**. 11. Select who can view and use the Data Source in projects. 12. Click **Finish Setup**. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Generic S3 Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-generic-s3 Create a Generic S3 Data Source with a bucket, optional subfolder, host, and access keys, then test credentials and assign access. This topic describes how to connect to a generic S3 service (such as [MiniO](https://min.io/)) from Domino. You must have network connectivity between your S3 service and your Domino deployment. The easiest way to connect to a generic S3 service from Domino is to create a Domino Data Source as described below. ## Create a Generic S3 Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Generic S3**. 4. Enter the **Bucket**. 5. Optional: Enter a **Subfolder Path**, such as `myFolder` or `data/tests`, to restrict the Data Source to only list data from and write to the specified folder. 6. Enter the **Host**. 7. Enter the **Data Source Name**. 8. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 9. Click **Next**. 10. Enter the **Access Key ID** and **Secret Access Key** to connect to Generic S3. The Domino secret store backed by HashiCorp Vault securely stores the credentials. 11. Click **Test Credentials**. 12. If the Data Source authenticates, click **Next**. 13. Select who can view and use the Data Source in projects. 14. Click **Finish Setup**. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Greenplum Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-greenplum Use an administrator-created Greenplum Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to IBM Db2 Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-ibm-db2 Connect to IBM Db2 through an administrator-created Data Source, or set up unsupported direct access from Python with ibm_db and R with ibmdbR. You can connect to IBM db2 using a Data Source or directly. ## IBM db2 Data Source Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Direct connection Connect directly to [IBM db2](https://www.ibm.com/products/db2) from Domino. You must have network connectivity between IBM db2 and your Domino deployment. Domino does not officially support this method. We provide this information as a courtesy. ## Python and ibm\_DB2 Domino recommends the [ibm\_db](https://github.com/ibmdb/python-ibmdb) package for interacting with DB2 databases from Python. ### Environment setup Use the following Dockerfile instruction to add [ibm\_db](https://pypi.org/project/ibm_db/) to your environment. This instruction assumes you already have [pip](https://pypi.org/project/pip/) installed. ```dockerfile theme={null} RUN pip install ibm_db ibm_db_sa ``` ### Credential setup Set the following Domino environment variables to store secure information about your DB2 connection. * `db_username` * `db_password` See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. ### Usage See [Python support for IBM Db2 for LUW, IBM Informix and IBM Db2 for z/OS](https://github.com/ibmdb/python-ibmdb) for detailed information about how to use the package. The following is an example for connecting to DB2 with ibm\_db where: * You have set up the environment variables with the `db_username` and `db_password`. * You’ve replaced `my.host.name` with the host name for your machine. ```python theme={null} import ibm_db import ibm_db_dbi import pandas as pd hostname = 'my.host.name' port = 50001 username = os.environ['db_username'] password = os.environ['db_password'] def query_db(sql): ibm_db_conn = ibm_db.connect("DATABASE=IBMPROD;HOSTNAME={};PORT={};PROTOCOL=TCPIP;UID={};PWD={};".format(hostname, port, username, password), "", "") conn = ibm_db_dbi.Connection(ibm_db_conn) df = pd.read_sql_query(sql, conn) ibm_db.close(ibm_db_conn) return df sql_cmd = """ SELECT * FROM table """ df_cmd = query_db(sql_cmd) df_cmd ``` See [Connecting to an IBM database server in Python](https://www.ibm.com/docs/en/SSEPGG_9.7.0/com.ibm.swg.im.dbclient.python.doc/doc/t0054368.html). ## R and ibmdbR Domino recommends the [imbdbR](https://www.ibm.com/support/knowledgecenter/en/SS6NHC/com.ibm.swg.im.dashdb.doc/connecting/connect_connecting_rstudio.html) library for interacting with DB2 databases from R. ### Environment setup Use the following Dockerfile instruction to add ibmdbR to your environment. ```dockerfile theme={null} RUN R -e 'install.packages("ibmdbR")' ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to IBM Netezza Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-ibm-netezza Connect to IBM Netezza through an administrator-created Data Source, or set up unsupported direct access with nzpy for Python or RJDBC for R. You can connect to IBM Netezza using a Data Source or directly. ## IBM Netezza Data Source Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Direct connection Connect directly to [IBM Netezza](https://www.ibm.com/products/netezza) from Domino. You must have network connectivity between Netezza and your Domino deployment. Domino does not officially support this method. We provide this information as a courtesy. ## Python and nzpy Domino recommends the [nzpy](https://pypi.org/project/nzpy/) package for interacting with Netezza from Python. ### Environment setup Use the following Dockerfile instruction to add [nzpy](https://pypi.org/project/nzpy/) to your environment. This instruction assumes you already have [pip](https://pypi.org/project/pip/) installed. ```dockerfile theme={null} RUN pip install nzpy ``` ### Credential setup You must set the following Domino environment variables to store secure information about your Netezza connection * `db_username` * `db_password` See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. ### Usage See the [nzpy docs](https://github.com/IBM/nzpy) for detailed information about how to use the package. The following is an example for connecting to Netezza with nzpy where: * You have set up environment variables noted above with the `db_username` and `db_password` * You’ve replaced `my.host.name` with the host name for your machine * You’ve replaced `my.database.name` with the database name for your machine ```python theme={null} import nzpy import os import pandas as pd hostname = 'my.host.name' database_name = 'my.database.name' port = 5480 username = os.environ['db_username'] password = os.environ['db_password'] def query_db(sql): conn = nzpy.connect(user=username, password=password, host=hostname, port=port, database=database_name) with conn.cursor() as cursor: cursor.execute(sql) df = cursor.fetchall() return df sql_cmd = """ SELECT * FROM table """ df_cmd = query_db(sql_cmd) df_cmd ``` ## R and RJDBC Domino recommends the RJDBC package and nzjdbc jar for interacting with Netezza from R. ### Environment setup Use the following Dockerfile instruction to add RJDBC to your environment. ```dockerfile theme={null} RUN R -e 'install.packages("RJDBC")' ``` ### Credential setup You must set the following Domino environment variables to store secure information about your Netezza connection * `db_username` * `db_password` See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. ### Usage Test if the `nzjdbc` jar is working as expected by running the below in a workspace terminal `java -jar -t -h my.host.name -p 5480 -u -db ` The following is a simple example for connecting to Netezza with RJDBC and `nzjdbc` jar where: * `nzjdbc` jar is present in the project files (`/mnt/nzjdbc3`) * You have set up environment variables noted above with the `db_username` and `db_password` * You’ve replaced `my.host.name` with the host name for your machine * You’ve replaced `my.database.name` with the database name for your machine ```R theme={null} library(RJDBC) drv <- RJDBC::JDBC(driverClass = "org.netezza.Driver", classPath = "/mnt/nzjdbc3.jar") conn <- dbConnect(drv, 'jdbc:netezza://my.host.name:5480/my.database.name;logLevel=2',Sys.getenv('db_username'), Sys.getenv('db_password')) dbListTables(conn) ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Ignite Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-ignite Use an administrator-created Ignite Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to MariaDB Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-mariadb Use an administrator-created MariaDB Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to MongoDB Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-mongodb Use an administrator-created MongoDB Data Source in a Project, query it with SQL using UNNEST for nested objects, and share it with collaborators. Your administrator must create a Data Source for [MongoDB](https://www.mongodb.com/) that you can access. See [Connect to MongoDB](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) in the [Admin Guide](/cloud/admin). After your administrator has created the Data Source, you can [work with it in your project](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) as usual. Domino data sources do not support querying nested objects. The workaround is to [`UNNEST`](https://count.co/sql-resources/bigquery-standard-sql/unnest) the object in the SQL query. The following is an example `UNNEST` query: ```python theme={null} res = ds.query(""" select account_id, t1 from sample_analytics.transactions cross join unnest (transactions) as t(t1, t2, t3, t4, t5, t6) """) ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to MSSQL Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-mssql Create a Microsoft SQL Server Data Source with host, database, and credentials, or use unsupported direct connections from Python or R. This topic describes how to connect to a [Microsoft SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-2016) (MSSQL) from Domino. You must have network connectivity between Microsoft SQL Server and your Domino deployment. The easiest way to connect to MSSQL from Domino is to create a Domino Data Source as described below. ## Create a MSSQL Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **SQL Server**. 4. Enter the **Host**. Valid values are `:` or ``. 5. Enter the **Port**. 6. Enter the name of the **Database**. 7. Enter the **Data Source Name**. 8. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 9. Click **Next**. 10. Enter the **Username** and **Password** to connect to SQL Server. The Domino secret store backed by HashiCorp Vault securely stores the credentials. 11. Click **Test Credentials**. 12. If the Data Source authenticates, click **Next**. 13. Select who can view and use the Data Source in projects. 14. Click **Finish Setup**. ## Alternate way to connect to an MSSQL Data Source This section describes an alternate method to connect to . Domino does not officially support this method. 1. To interact with MSSQL databases from Python, Domino recommends the [pymssql](http://www.pymssql.org/) package. 2. Use the following Dockerfile instruction to [install pymssql](http://www.pymssql.org/intro.html) in your environment. This instruction assumes you already have [pip](https://pypi.org/project/pip/) installed. ```dockerfile theme={null} RUN pip install pymssql ``` 3. You must set up the following Domino environment variables to store secure information about your MSSQL connection. * `DB_SERVER` * `DB_USERNAME` * `DB_PASSWORD` See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. See the [pymssql documentation](http://www.pymssql.org/pymssql_examples.html) for detailed information about how to use the package. The following is an example of connecting to MSSQL with Python where the following is true: * You have set up environment variables noted previously. * The server hosts a database named `myData` with a table named `addresses`. ```python theme={null} from os import getenv import pymssql server = getenv("DB_SERVER") user = getenv("DB_USERNAME") password = getenv("DB_PASSWORD") conn = pymssql.connect(server, user, password, "myData") cursor = conn.cursor() cursor.execute('SELECT * FROM addresses') row = cursor.fetchone() while row: print("ID=%d, Name=%s" % (row[0], row[1])) row = cursor.fetchone() conn.close() ``` ### R and RODBC to MSSQL 1. To interact with MSSQL databases from R, Domino recommends the [RODBC](https://cran.r-project.org/web/packages/odbc/index.html) library. You can use an alternative package if you’d like. 2. Use the following Dockerfile instructions to add the MSSQL drivers to your Ubuntu 16.04 environment. ```dockerfile theme={null} USER root RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list RUN apt-get update RUN ACCEPT_EULA=Y apt-get install msodbcsql17 USER ubuntu ``` 3. See Microsoft’s documentation for the Dockerfile instructions to add the MSSQL drivers to your Domino-supported Ubuntu environment. 4. See the [RStudio RODBC documentation](https://db.rstudio.com/databases/microsoft-sql-server/) for information about how to use the package. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to MySQL Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-mysql Create a MySQL Data Source with basic or IAM authentication, or use unsupported direct connections with mysql-connector-python or RMySQL. This topic describes how to connect to [MySQL](https://www.mysql.com/) from Domino. You must have network connectivity between MySQL and your Domino deployment. The easiest way to connect to MySQL from Domino is to create a Domino Data Source as described below. ## Create a MySQL tabular Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **MySQL**. 4. Enter the **Host**. Valid values are `:` or ``. If no port is specified, the default is 3306. 5. Enter the name of the **Database**. 6. Enter the **Data Source Name**. 7. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 8. Click **Next**. 9. Specify the credentials for authenticating to MySQL. Basic authentication is supported by default. IAM credential propagation might also be available if your administrator has [enabled it](/cloud/admin/data-administration/external-data#iam-authentication-for-aws-data-sources). IAM-authenticated connections can be used only for executing jobs and workspaces. Other execution types, such as scheduled jobs and Domino endpoints, require basic authentication. 10. If you are using basic authentication, click **Test Credentials** to validate your username and password. 11. Click **Next** (or **Skip for Now** to configure authentication later). 12. Select whether **Everyone** can access this Data Source or just **Specific users or organizations**. 13. Select who can view and use the Data Source in projects. 14. Click **Finish Setup**. ## Alternate way to connect to a MySQL Data Source This section describes an alternate method to connect to . Domino does not officially support this method. 1. Domino recommends the [mysql-connector-python](https://dev.mysql.com/doc/connector-python/en/) library to interact with MySQL databases from Python. 2. Use the following Dockerfile instruction to [install mysql-connector-python](https://dev.mysql.com/doc/connector-python/en/) in your environment. You must have [pip](https://pypi.org/project/pip/) installed. ```dockerfile theme={null} USER root RUN pip install mysql-connector-python USER ubuntu ``` 3. You must set up the Domino environment variables to store secure information about your MySQL connection. * `MYSQL_HOST` Hostname where your MySQL service is running. Make sure your MySQL service and network firewall are configured to accept connections from Domino. * `MYSQL_USER` The MySQL user you want to authenticate as. * `MYSQL_PASSWORD` The password for the user chosen previously. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. 4. See the [mysql-connector-python documentation](https://dev.mysql.com/doc/connector-python/en/) for information about how to use the package. The following is an example to connect to MySQL with `mysql-connector-python` where: * You have set up environment variables with the host, user, and password. * Your user has access to a database named `db1` in the target MySQL instance. * The `db1` database contains a table called `employees`. ```python theme={null} from mysql.connector import (connection) import os # fetch values from environment variables and set the target database hostname = os.environ['MYSQL_HOST'] username = os.environ['MYSQL_USER'] password = os.environ['MYSQL_PASSWORD'] dbname = 'db1' # establish connection to db1 database in your mysql service cnx = connection.MySQLConnection(user=username, password=password, host=hostname, database=dbname) # create cursor for passing queries to database cursor = cnx.cursor() # define query query = ("SELECT * FROM employees") # execute query cursor.execute(query) # print results for row in cursor: print(row) # close connection cnx.close() ``` ### R and RMySQL 1. To interact with MySQL services from R, Domino recommends the [RMySQL](https://www.rdocumentation.org/packages/RMySQL/versions/0.10.16) library. 2. Use the following Dockerfile instructions to add RMySQL to your environment. ```dockerfile theme={null} RUN sudo apt-get install -y libmariadb-client-lgpl-dev RUN R -e 'install.packages("RMySQL")' ``` 3. Set the following Domino environment variables to store secure information about your MySQL connection. * `MYSQL_HOST` Hostname where your MySQL service is running. Make sure your MySQL service and network firewall are configured to accept connections from Domino. * `MYSQL_USER` The MySQL user you want to authenticate as. * `MYSQL_PASSWORD` The password for the user chosen previously. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. 4. See the [RMySQL documentation](https://www.rdocumentation.org/packages/RMySQL/versions/0.10.16) for information about how to use the package. The following is an example for connecting to MySQL with RMySQL where: * You have set up environment variables with the host, user, and password. * Your user has access to a database named `db1` in the target MySQL instance. * The database contains a table named `employees`. ```r theme={null} # load the library library(RMySQL) # fetch values from environment variables and set the target database hostname <- Sys.getenv['MYSQL_HOST'] username <- Sys.getenv['MYSQL_USER'] password <- Sys.getenv['MYSQL_PASSWORD'] database <- 'db1' # set up a driver and use it to create a connection to your database con <- dbConnect(RMySQL::MySQL(), host = hostname, user = username, password = password, dbname = database) # run a query and load the response into a dataframe df_mysql <- dbGetQuery(con, "SELECT * FROM employees") # close your connection when finished dbDisconnect(con) ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Oracle Database Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-oracle Create an Oracle Data Source with host, port, database, and credentials, or use unsupported direct Python and R connections with Oracle Instant Client. This topic describes how to connect to [Oracle Database](https://www.oracle.com/database/) from Domino. You must have network connectivity between Oracle and your Domino deployment. The easiest way to connect to Oracle from Domino is to create a Domino Data Source as described below. ## Create an Oracle Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Oracle**. 4. Enter the **Host**, **Port**, and name of the **Database**. 5. Enter the **Data Source Name**. 6. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 7. Click **Next**. 8. Enter the **Username** and **Password** to connect to Oracle. The Domino secret store backed by HashiCorp Vault securely stores the credentials. 9. Click **Test Credentials**. 10. If the Data Source authenticates, click **Next**. 11. Select who can view and use the Data Source in projects. 12. Click **Finish Setup**. ## Alternate way to connect to Oracle This section describes an alternate method to connect to . Domino does not officially support this method. 1. Before you can connect to Oracle, you must install the following client software your environment: * The basic package: `instantclient-basic-linux.x64-dbru.zip` * The SDK package: `instantclient-sdk-linux.x64-dbru.zip` You must download these files from the [Instant Client Downloads page](https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html). 1. Use your Oracle customer login. 2. Host an internal mirror of the files somewhere accessible to your Domino hosts. 3. Install the software manually. In the example environments in this topic, these files are retrieved from a private S3 bucket with [Wget](https://en.wikipedia.org/wiki/Wget). You must make them available in a similar manner for your Domino deployment. ### Python and cx\_Oracle 1. To interact with Oracle databases from Python, Domino recommends the [cx\_Oracle](https://oracle.github.io/python-cx_Oracle/) library. 2. Use the following Dockerfile instruction to install the Oracle client drivers and cx\_Oracle in your environment. You cannot copy and paste this Dockerfile directly, because you must set up your own internal host of the Oracle clients and modify the `wget` step shown here to retrieve them. ```dockerfile theme={null} USER root RUN \ wget https://download.oracle.com/otn_software/linux/instantclient/2350000/instantclient-sdk-linux.x64-23.5.0.24.07.zip -O /home/ubuntu/instantclient-sdk-linux.x64-23.5.0.24.07.zip && \ cd /home/ubuntu && \ unzip instantclient-sdk-linux.x64-23.5.0.24.07.zip && \ mv instantclient_23_5 /usr/local/lib && \ rm instantclient-sdk-linux.x64-23.5.0.24.07.zip && \ apt-get install -y libaio1 RUN \ echo 'export OCI_LIB=/usr/local/lib/instantclient_23_5' \ >> /home/ubuntu/.domino-defaults && \ echo 'export OCI_INC=/usr/local/lib/instantclient_23_5/sdk/include' \ >> /home/ubuntu/.domino-defaults && \ echo 'export LD_LIBRARY_PATH=/usr/local/lib/instantclient_23_5:$LD_LIBRARY_PATH' \ >> /home/ubuntu/.domino-defaults RUN \ cd /usr/local/lib/instantclient_23_5 && \ ln -sf libclntsh.so.23.5 libclntsh.so && \ chown -R ubuntu:ubuntu /usr/local/lib/instantclient_23_5 RUN \ echo '/usr/local/lib/instantclient_23_5' \ > /etc/ld.so.conf.d/oracle-instantclient.conf && \ ldconfig -v RUN pip install cx_Oracle --upgrade USER ubuntu ``` 3. Set the following Domino environment variables to store secure information about your Oracle connection. * `ORACLE_HOST` Hostname where your database is running. Make sure your Oracle host and network firewall are configured to accept connections from Domino. * `ORACLE_SERVICE` The service name of the Oracle service running on the target host. * `ORACLE_USER` The Oracle user you want to authenticate as. * `ORACLE_PASSWORD` Password for the user specified previously. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. 4. See the [cx\_Oracle documentation](https://cx-oracle.readthedocs.io/en/latest/index.html) for information about how to use the package. The following is an example to connect to Oracle with cx\_Oracle where: * You have set up environment variables with the hostname, service name, username, and password. * Your user has access to a database named `houses` in the target Oracle instance. ```python theme={null} from __future__ import print_function import cx_Oracle import os # fetch values from environment variables and set the target database hostname = os.environ['ORACLE_HOST'] service = os.environ['ORACLE_SERVICE'] username = os.environ['ORACLE_USER'] password = os.environ['ORACLE_PASSWORD'] connection_string = hostname + "/" + service # Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer. connection = cx_Oracle.connect(username, password, connection_string) cursor = connection.cursor() cursor.execute(""" SELECT address FROM houses WHERE zip = 90210""") for address in cursor: print("Address:", address) ``` ### R and ROracle 1. To interact with Oracle databases from R, Domino recommends the [ROracle](https://cran.r-project.org/web/packages/ROracle/index.html) library. 2. Use the following Dockerfile instruction to install the Oracle client drivers and RODBC in your environment. You cannot copy and paste this Dockerfile directly because you must set up your own internal host of the Oracle clients and modify the `wget` step shown here to retrieve them. ```dockerfile theme={null} USER root RUN \ wget https://download.oracle.com/otn_software/linux/instantclient/2350000/instantclient-sdk-linux.x64-23.5.0.24.07.zip -O /home/ubuntu/instantclient-sdk-linux.x64-23.5.0.24.07.zip && \ cd /home/ubuntu && \ unzip instantclient-sdk-linux.x64-23.5.0.24.07.zip && \ mv instantclient_23_5 /usr/local/lib && \ rm instantclient-sdk-linux.x64-23.5.0.24.07.zip && \ apt-get install -y libaio1 RUN \ echo 'export OCI_LIB=/usr/local/lib/instantclient_23_5' \ >> /home/ubuntu/.domino-defaults && \ echo 'export OCI_INC=/usr/local/lib/instantclient_23_5/sdk/include' \ >> /home/ubuntu/.domino-defaults && \ echo 'export LD_LIBRARY_PATH=/usr/local/lib/instantclient_23_5:$LD_LIBRARY_PATH' \ >> /home/ubuntu/.domino-defaults RUN \ cd /usr/local/lib/instantclient_23_5 && \ ln -s libclntsh.so.23.5 libclntsh.so && \ chown -R ubuntu:ubuntu /usr/local/lib/instantclient_23_5 RUN \ echo '/usr/local/lib/instantclient_23_5' \ > /etc/ld.so.conf.d/oracle-instantclient.conf && \ ldconfig -v RUN \ cd /home/ubuntu && \ wget https://cran.r-project.org/src/contrib/ROracle_1.3-1.tar.gz && \ R CMD INSTALL --configure-args='--with-oci-inc=/usr/local/lib/instantclient_23_5/sdk/include --with-oci-lib=/usr/local/lib/instantclient_23_5' ROracle_1.3-1.tar.gz USER ubuntu ``` 3. Set up the following Domino environment variables to store secure information about your Oracle connection. * `ORACLE_HOST` Hostname where your database is running. Make sure your Oracle host and network firewall are configured to accept connections from Domino. * `ORACLE_SERVICE` The service name of the Oracle service running on the target host. * `ORACLE_USER` The Oracle user you want to authenticate as. * `ORACLE_PASSWORD` Password for the user specified previously. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. 4. See the [ROracle documentation](https://www.rdocumentation.org/packages/ROracle/versions/1.3-1/topics/dbConnect-methods) for usage details. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Palantir Foundry Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-palantir Access Palantir Foundry through an administrator-created Data Source or configure a user token, dataset path, and Palantir SDK in Domino. Learn how to connect to [Palantir Foundry](https://www.palantir.com/platforms/foundry/) from Domino. You must have network connectivity between Palantir and your Domino deployment. ## Create a Palantir Foundry Data Source The easiest and most secure way to connect to Palantir from Domino is to have your administrator [create a Data Source for Palantir Foundry](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) for users to access. After your administrator has created the Data Source, you can [use the Data Source](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) as usual. You must specify the dataset path, obtained from the [Dataset Preview](https://www.palantir.com/docs/foundry/data-integration/dataset-preview/index.html) in Palantir, in your query as shown in this example: ```python theme={null} res = ds.query('SELECT * FROM "/namespace/project"."/namespace/project/path/to/your/dataset"') ``` ## Connect using individual user credentials You can also choose to use individual user credentials to connect to Palantir. However, you should contact your Palantir admin to ensure this method is compliant with your organization’s governance policies. 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**. Palantir UI on the Tokens page 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 Foundry application, go to the **Project** containing the dataset and select the dataset. 2. In the **About** section, copy the **Location** attribute. You can also copy and use the **RID** field as a permalink to this dataset. 3. Save the location 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. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. ### 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: ```shell theme={null} RUN pip install -user palantir-sdk ``` You can also create a cell at the top of a Jupyter Notebook and run the following: ```shell theme={null} pip install palantir-sdk ``` ### Run your code You can now access your Palantir Foundry data through Python, from a Jupyter notebook or VS Code. Jupyter notebook accessing a Palantir dataset and using the Palantir SDK ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Pinecone Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-pinecone Create a Pinecone Data Source with its API key, install the Python client and Domino Data SDK, and configure the client in a Workspace. Domino’s Pinecone vector database Data Source connector enables easy, secure access to vectorized content stored in [Pinecone](https://www.pinecone.io/). ## Create a Pinecone Data Source You need the following information about your Pinecone database: * Optional: Pinecone environment name * Optional: Pinecone project ID * [Pinecone API key](https://docs.pinecone.io/docs/quickstart#2-get-your-api-key) Pinecone environment name and Pinecone project ID are required if the data source is accessed through Python pinecone-client\<3.0.0. Follow these steps to find the Pinecone project ID: 1. Log into Pinecone and select the index you want to use: Select Pinecone Index 2. Your project ID is the seven-character string (`3r4nvmg` in this example): Pinecone ID Location To create a Pinecone Data Source: 3. From the navigation pane, click **Data > Data Sources**. 4. Click **Create a Data Source**. 5. In the New Data Source window, from **Select Data Store**, select **Pinecone**. 6. Provide the **Pinecone environment name**, **Pinecone project ID**, and [Pinecone API Key](https://docs.pinecone.io/docs/quickstart#2-get-your-api-key) for your Pinecone database. 7. Create a **Data Source Name** and an optional **Description**. Domino stores your Pinecone API Key, along with other secrets, in a [secure secret store backed by HashiCorp Vault](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables), so you can have confidence that your secrets are safe. You can test the API key before finalizing your Data Source: 1. Click **Test Credentials**. 2. Confirm that the Data Source authenticates. 3. Select who can view and use the Data Source in Projects. ## Use the Pinecone Data Source To use your Pinecone Data Source, you must install the prerequisite Python libraries in the compute Environment you want to run Pinecone commands in and configure the Pinecone client using a Domino-specific configuration. ### Install the Pinecone Python library and Domino Data SDK To use the Pinecone Python library in Domino, you must install the following libraries in your compute Environment. Domino standard environments have these libraries installed by default. If you are using a customized environment, [Edit your compute Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) and add the following lines to the Dockerfile instructions: You must replace the placeholder `{x.y.z}` with the compatible version of your Domino deployment. Refer to [all released packages](https://pypi.org/project/dominodatalab-data/#history). ```dockerfile theme={null} USER root RUN python -m pip install pinecone-client RUN python -m pip install dominodatalab-data=={x.y.z} USER ubuntu ``` ### Configure the Pinecone Python client To connect to your Pinecone service in a Domino execution, you must initialize your Pinecone connection using a Domino-specific Environment. To find the configuration code snippets: 1. [Add the Pinecone Data Source to your Project](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources#add-an-existing-data-source-to-a-project). 2. In your Workspace, go to **Data** > **Data Sources** > **Code snippet** > **Python**. 3. Copy the code snippet, paste it into your code, and modify it as needed. * The code snippet for pinecone-client\<3.0.0: ```python theme={null} import os import pinecone from domino_data.vectordb import DominoPineconeConfiguration datasource_name = "pinecone" conf = DominoPineconeConfiguration(datasource=datasource_name) # The pinecone API key should be provided when creating the Domino Data Source and persisted securely. # This api_key variable is only used to satisfy the native Pinecone Python client initialization where # api_key is a mandatory non-empty field. api_key = os.environ.get("DOMINO_VECTOR_DB_METADATA", datasource_name) pinecone.init( api_key=api_key, environment="domino", openapi_config=conf) print(pinecone.list_indexes()) # Replace the place holder {{index_name}} below with the index name. index = pinecone.Index("{{index_name}}") index.describe_index_stats() ``` * The code snippet for pinecone-client>=3.0.0: ```python theme={null} from domino_data.vectordb import domino_pinecone3x_init_params, domino_pinecone3x_index_params from pinecone import Pinecone datasource_name = "pinecone" pc = Pinecone(**domino_pinecone3x_init_params(datasource_name)) print(pc.list_indexes()) # Replace the place holder {{index_name}} below with the index name. index_name = "{{index_name}}" index = pc.Index(**domino_pinecone3x_index_params(datasource_name, index_name)) print(index.describe_index_stats()) # More Pinecone Python library-supported operations can be found at https://docs.pinecone.io/docs/python-client # gRPC client is currently not supported. ``` Once your Pinecone connection is initialized in the Domino execution, you can use the [Pinecone Python client](https://docs.pinecone.io/docs/python-client) as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to PostgreSQL Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-postgres Create a PostgreSQL Data Source with basic or IAM authentication, or use unsupported direct connections with psycopg2 or RPostgreSQL. This topic describes how to connect to [PostgreSQL](https://www.postgresql.org/) from Domino. You must have network connectivity between PostgreSQL and your Domino deployment. The easiest way to connect to PostgreSQL from Domino is to create a Domino Data Source as described below. ## Create a Postgres Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **PostgreSQL**. 4. Enter the **Host**, **Port**, and **Database** name. 5. Enter the **Data Source Name**. 6. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 7. Click **Next**. 8. Specify the credentials for authenticating to Postgres. Basic authentication is supported by default. IAM credential propagation might also be available if your administrator has [enabled it](/cloud/admin/data-administration/external-data#iam-authentication-for-aws-data-sources). IAM-authenticated connections can be used only for executing jobs and workspaces. Other execution types, such as scheduled jobs and Domino endpoints, require basic authentication. 9. If you are using basic authentication, click **Test Credentials** to validate your username and password. 10. Click **Next** (or **Skip for Now** to configure authentication later). 11. Enter the users and organizations who can view and use the Data Source in projects. 12. Click **Finish Setup**. ## Alternate way to connect to a Postgres Data Source This section describes an alternate method to connect to . Domino does not officially support this method. This instruction assumes you already have [pip](https://pypi.org/project/pip/) installed. 1. For Python and psycopg2, Domino recommends the [psycopg2](https://pypi.org/project/psycopg2/) library to interact with PostgreSQL databases from Python. 2. Use the following Dockerfile instruction to [install psycopg2](https://www.psycopg.org/docs/install.html) in your environment. ```dockerfile theme={null} RUN pip install psycopg2 ``` 3. Set the following as Domino environment variables to store secure information about your PostgreSQL connection. * `POSTGRES_HOST` Hostname where your DB is running. Make sure your PostgreSQL DB and network firewall are configured to accept connections from Domino. * `POSTGRES_USER` The PostgreSQL user you want to authenticate as. * `POSTGRES_PASSWORD` The password for the user chosen previously. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. 4. See the [psycopg2 documentation](https://www.psycopg.org/docs/) for detailed information about how to use the package. The following is an example to connect to PostgreSQL with `psycopg2` where: * You have set up environment variables with the hostname, username, and password. * Your user has access to a database named `db1` in the target PostgreSQL instance. * The database contains a table named `metrics`. ```python theme={null} import psycopg2 import os # fetch values from environment variables and set the target database hostname = os.environ['POSTGRES_HOST'] username = os.environ['POSTGRES_USER'] password = os.environ['POSTGRES_PASSWORD'] dbname = 'db1' # set up a connection object with parameters for your database conn = psycopg2.connect( host=hostname, port=5432, user=username, password=password, database=dbname, ) # create a cursor in your connection cur = conn.cursor() # execute a query on the metrics table and store the response cur.execute("SELECT * FROM metrics;") results = cur.fetchall() # display the contents of the response print(results) ``` The results object created in the previous example is a Python array of entries from the queried table. ### R and RPostgreSQL 1. To connect to R and RPostgreSQL, Domino recommends the [RPostgreSQL](https://www.rdocumentation.org/packages/RPostgreSQL/versions/0.6-2) library to interact with PostgreSQL databases from R. 2. Use the following Dockerfile instruction to add RPostgreSQL to your environment. ```dockerfile theme={null} RUN R -e 'install.packages("RPostgreSQL")' ``` 3. Set up the Domino environment variables to store secure information about your PostgreSQL connection. * `POSTGRES_HOST` Hostname where your DB is running. Make sure your PostgreSQL DB and network firewall are configured to accept connections from Domino. * `POSTGRES_USER` The PostgreSQL user you want to authenticate as. * `POSTGRES_PASSWORD` The password for the user chosen previously. See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. 4. See the [RPostgreSQL documentation](https://www.rdocumentation.org/packages/RPostgreSQL/versions/0.6-2) for information about how to use the package. The following is an example for connecting to PostgreSQL with RPostgreSQL where: * You have set up environment variables with the hostname, username, and password. * Your user has access to a database named `db1` in the target PostgreSQL instance. * The database contains a table named `` metrics` ``. ```r theme={null} # load the library library(RPostgreSQL) # fetch values from environment variables and set the target database hostname <- Sys.getenv['POSTGRES_HOST'] username <- Sys.getenv['POSTGRES_USER'] password <- Sys.getenv['POSTGRES_PASSWORD'] database <- 'db1' # set up a driver and use it to create a connection to your database drv <- dbDriver("PostgreSQL") conn <- dbConnect( drv, host=hostname, port=5432, user=username, password=password, dbname=database ) # run a query and load the response into a dataframe df_postgres <- dbGetQuery(conn, "SELECT * from metrics;") # close your connection when finished dbDisconnect(conn) ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Qdrant Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-qdrant Create a Qdrant Data Source with its host, port, and API key, install qdrant-client, and configure the Python client in a Workspace. Domino’s Qdrant vector database Data Source connector enables easy, secure access to vectorized content stored in [Qdrant](https://qdrant.tech/). ## Create a Qdrant Data Source You need the following information about your Qdrant database: * Host * Port * [Qdrant API key](https://qdrant.tech/documentation/cloud/authentication/#create-api-keys) To create a Qdrant Data Source: 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Qdrant**. 4. Provide the Qdrant **Host** name, **Port**, and [Qdrant API Key](https://qdrant.tech/documentation/cloud/authentication/#create-api-keys) for your Qdrant database. 5. Specify a **Data Source Name** and an optional **Description**. Domino stores your Qdrant API Key, along with other secrets, in a [secure secret store backed by HashiCorp Vault](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables), so you can have confidence that your secrets are safe. You can test the API key before finalizing your Data Source: 1. Click **Test Credentials**. 2. Confirm that the Data Source authenticates. 3. Select who can view and use the Data Source in Projects. ## Use the Qdrant Data Source To use your Qdrant Data Source, you must install the prerequisite Python libraries in the compute Environment you want to run Qdrant commands in and configure the Qdrant client using a Domino-specific configuration. ### Install the Qdrant Python library To install the Qdrant Python library in your compute Environment by [edit your compute Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) and add the following lines to the Dockerfile instructions: ```dockerfile theme={null} USER root RUN pip install --user qdrant-client USER ubuntu ``` ### Configure the Qdrant Python client To connect to your Qdrant service in a Domino execution, you must initialize your Qdrant connection using a Domino-specific Environment. To find the configuration code snippets: 1. [Add the Qdrant Data Source to your Project](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources#add-an-existing-data-source-to-a-project). 2. In your Workspace, go to **Data** > **Data Sources** > **Code snippet** > **Python**. 3. Copy and paste the following code snippet into your code, and modify it as needed. ```python theme={null} import os from qdrant_client import QdrantClient # Create the Qdrant client qdrant = QdrantClient( url=os.environ.get("DOMINO_DATA_API_GATEWAY", "http://127.0.0.1:8766"), metadata={"X-Domino-Datasource": "qdrant"}, ) # List all collections print(qdrant.get_collections()) ``` Once your Qdrant connection is initialized in the Domino execution, you can use the [Qdrant Python client](https://python-client.qdrant.tech/) normally. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Redshift Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-redshift Create an Amazon Redshift Data Source with basic or IAM authentication, or use unsupported direct connections with psycopg2 or RPostgreSQL. This topic describes how to connect to [Amazon Redshift](https://aws.amazon.com/pm/redshift/) from Domino. You must have network connectivity between Redshift and your Domino deployment. The easiest way to connect to Redshift from Domino is to create a Domino Data Source as described below. ## Create a Redshift Data Source 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Amazon Redshift**. 4. Enter the **Host**, **Port**, and name of the **Database**. 5. Enter the **Data Source Name**. 6. Optional: Enter a **Description** to explain the purpose of the Data Source to others. 7. Click **Next**. 8. Specify the credentials for authenticating to Redshift. Basic authentication is supported by default. IAM credential propagation might also be available if your administrator has [enabled it](/cloud/admin/data-administration/external-data#iam-authentication-for-aws-data-sources). IAM-authenticated connections can be used only for executing jobs and workspaces. Other execution types, such as scheduled jobs and Domino endpoints, require basic authentication. 9. If you are using basic authentication, click **Test Credentials** to validate your username and password. 10. Select who can view and use the Data Source in projects. 11. Click **Finish Setup**. ## Alternate way to connect to a Redshift Data Source This section describes an alternate method to connect to . Domino does not officially support this method. ### Prerequisites * Domino recommends storing your database username and password as [environment variables](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/manage-environment-variables) in your project. This lets you access them at runtime without including them in your code. ### Python To establish a connection to Redshift with the `psycopg2` library: ```python theme={null} import psycopg2 import os HOST = os.environ['REDSHIFT_HOST'] PORT = 5439 # redshift default USER = os.environ['REDSHIFT_USER'] PASSWORD = os.environ['REDSHIFT_PASSWD'] DATABASE = 'mydatabase' def db_connection(): conn = psycopg2.connect( host=HOST, port=PORT, user=USER, password=PASSWORD, database=DATABASE, ) return conn example_query = "SELECT * FROM my_table LIMIT 5" conn = db_connection() try: cursor = conn.cursor() cursor.execute(example_query) results = cursor.fetchall() # careful, the results could be huge conn.commit() print results finally: conn.close() # using pandas import pandas as pd conn = db_connection() try: df = pd.read_sql(example_query, conn) df.to_csv('results/outfile.csv', index=False) finally: conn.close() ``` ### R To establish a connection to Redshift with the RPostgreSQL library: ```r theme={null} install.packages("RPostgreSQL") library(RPostgreSQL) redshift_host <- Sys.getenv("REDSHIFT_HOST") redshift_port <- "5439" redshift_user <- Sys.getenv("REDSHIFT_USER") redshift_password <- Sys.getenv("REDSHIFT_PASSWORD") redshift_db <- "mydatabase" drv <- dbDriver("PostgreSQL") conn <- dbConnect( drv, host=redshift_host, port=redshift_port, user=redshift_user, password=redshift_password, dbname=redshift_db) tryCatch({ example_query <- "SELECT * FROM my_table LIMIT 5" results <- dbGetQuery(conn, example_query) print(results) }, finally = { dbDisconnect(conn) }) ``` ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to SAP HANA 2 Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-saphana Use an administrator-created SAP HANA 2 Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to SingleStore (MemSQL) Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-singlestore Use an administrator-created SingleStore Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Snowflake Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-snowflake Create a Snowflake Data Source with database, schema, warehouse, and role options, then authenticate with basic credentials or OAuth. This topic describes how to connect to [Snowflake](https://www.snowflake.com/) from Domino. The easiest way to connect to Snowflake from Domino is to create a Domino Data Source as described below. ## Prerequisites You must have network connectivity between Snowflake and your Domino deployment. To use Snowflake code integrations, such as [Snowpark](https://docs.snowflake.com/en/developer-guide/snowpark/index.html), you must agree to the [Snowflake third party terms](https://docs.snowflake.com/en/developer-guide/udf/python/udf-python-packages.html#getting-started). To agree to these terms, you must have a Snowflake account with the [ORGADMIN](https://docs.snowflake.com/en/user-guide/organizations-gs.html#enabling-the-orgadmin-role-for-an-account) role. If you don’t have access to a Snowflake account with the ORGADMIN role, [submit a Snowflake support ticket](https://community.snowflake.com/s/article/How-To-Submit-a-Support-Case-in-Snowflake-Lodge). ## Create a Snowflake Data Source Domino recommends that you use a [Domino Data Source](/cloud/platform-capabilities/core-concepts/data/data-source-connectors) to connect to a Snowflake instance from Domino. 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Snowflake**. **Account Name**\ If the Domino deployment and Snowflake Data Source, are in the same region, enter the **Account Name** as ``. However, if the Domino deployment and Snowflake Data Source are in different regions, enter the **Account Name** as `.`. For example, `abc.us-east`. (For Azure, these might take the form of `def.east-us-2.azure`.) **Optional: Database**\ The name of the Snowflake database that contains the data. **Optional: Schema**\ The name of the active schema for the session. **Optional: Warehouse**\ The name of all the compute resource clusters that provide the resources in Snowflake. **Optional: Role**\ The role that has privileges to the Data Source. **Data Source Name**\ The name that identifies the Data Source. **Optional: Description**\ The purpose for the Data Source. 4. Click **Next**. 5. Specify the credentials for authenticating to Snowflake. * **Basic authentication** is supported by default. The Domino secret store backed by HashiCorp Vault securely stores the credentials. * **OAuth authentication** is available if your administrator has [enabled this option](/cloud/admin/data-administration/external-data#oauth-for-snowflake). OAuth-authenticated connections can be used for any execution type *except* Domino endpoints. 6. If you are using basic authentication, click **Test Credentials** to validate your username and password. 7. Click **Next** (or **Skip for Now** to configure authentication later). 8. Select who can view and use the Data Source in projects. 9. Click **Finish Setup**. If your users have Domino permissions to use the Data Source and enter their credentials, they can now use the Domino Data API to retrieve data with the connector. See [Retrieve Data](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) for more information. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources#share-a-data-source) with your collaborators. # Connect to Starburst/Trino Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-starburst-trino Create a Starburst or Trino Data Source with host, port, catalog, schema, and credentials, then run queries against connected data stores. Use the Starburst/[Trino](https://trino.io/docs/current/) Data Source to connect to an existing Starburst/Trino cluster. Once connected, you can use the Data Source to: * Execute queries against the Starburst/Trino cluster using the data stores it’s connected to. * Run Starburst/Trino federated queries supported by your Starburst/Trino cluster. See the [list of Trino connectors](https://trino.io/docs/current/connector.html) Trino connectors for supported data stores. You must have network connectivity between the Starburst/Trino cluster and your Domino deployment. In a hybrid deployment, Trino Data Sources are only available in executions that use a hardware tier in the local [data plane](/cloud/platform-capabilities/core-concepts/data-plane). ## Create a Trino Data Source Domino recommends that you use a [Domino Data Source](/cloud/platform-capabilities/core-concepts/data/data-source-connectors) to connect to a Trino instance. 1. From the navigation pane, click **Data > Data Sources**. 2. Click **Create a Data Source**. 3. In the New Data Source window, from **Select Data Store**, select **Trino**. 4. Enter the details about your Data Source and click **Next**: **Host**\ The URL, hostname, or IP address of your Trino host. **Optional: Networking Proxy**\ The URL (host and port) of your networking proxy that points to your Trino cluster, if applicable. **Port**\ The port number for the connection, such as 443. **Catalog**\ The name of the Trino catalog where your data is located. For example, if you plan to use the table `hive.test_data.test` then the catalog name is `hive`. **Optional: Schema**\ The name of the Trino schema to use. For example, if you plan to use the table `hive.test_data.test` then the schema name is `test_data`. **Data Source Name**\ The name that identifies the Data Source. **Optional: Data Source Description**\ The purpose for the Data Source. 5. Specify the credentials for authenticating to Trino. Basic authentication is supported by default. The Domino secret store backed by HashiCorp Vault securely stores the credentials. 6. Click **Test Credentials**. 7. If the Data Source authenticates, click **Next**. 8. Select who can view and use the Data Source in projects. 9. Click **Finish Setup**. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Synapse Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-synapse Use an administrator-created Synapse Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Connect to Teradata Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-teradata Use an administrator-created Teradata Data Source, or use an unsupported direct connection with the Teradata SQL Driver for Python and environment variables. This topic describes how to connect to [Teradata](https://www.teradata.com/) from Domino. Teradata Vantage is a multicloud data platform providing access to data lakes, data warehouses, and analytics. You must have network connectivity between Teradata and your Domino deployment. The easiest way to connect to Teradata from Domino is to create a Domino Data Source as described below. ## Create a Teradata Data Source Administrators can create a Data Source for Teradata that Domino users can access. Domino recommends this method. See the [Admin Guide](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source) for details. After your administrator has created the Data Source, you can [query it](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). You must specify the database name in your query, as in this example where `td_demo` is the database name and `yellow_cab` is the table name: ```python theme={null} res = ds.query("select * from td_demo.yellow_cab") ``` ## Alternate way to connect to a Teradata Data Source Domino does not officially support this method. We provide this information as a courtesy. Domino recommends the [Teradata SQL Driver for Python](https://pypi.org/project/teradatasql/). ### Environment setup The Teradata SQL driver for Python comes pre-installed in several Domino environments. If your environment does not have it installed by default, you can use the following Dockerfile instructions to add it to your environment: ```dockerfile theme={null} RUN pip install teradatasql ``` ### Credential setup Set the following Domino environment variables to store secure information about your Teradata connection. * `TERADATA_USER` * `TERADATA_PASSWORD` * `TERADATA_HOST` See [Store Project credentials](/cloud/platform-capabilities/core-concepts/projects/project-settings#store-credentials-as-environment-variables) to learn more about Domino environment variables. ### Usage See the [Teradata SQL Driver for Python documentation](https://github.com/Teradata/python-driver) for information about how to use the package. The following is an example. ```python theme={null} import teradatasql import os con = teradatasql.connect( user=os.environ['TERADATA_USER'], password=os.environ['TERADATA_PASSWORD'], host=os.environ['TERADATA_HOST'] ) cur = con.cursor() try: cur.execute ('{fn teradata_nativesql}Driver version {fn teradata_driver_version} Database version {fn teradata_database_version}') print (cur.fetchone () [0]) finally: cur.close() con.close() ``` ## Additional resources for Teradata SQL driver **Python**: * [Official documentation](https://docs.teradata.com/r/I5P9sy9O8T4Bsv1ndwGMbg/y3UhMbfkXZVQkYdQlf92lA) * [Repository](https://github.com/Teradata/python-driver) * [Package](https://pypi.org/project/teradatasql/) **R**: * [Official documentation](https://docs.teradata.com/r/I5P9sy9O8T4Bsv1ndwGMbg/dVYM0P9c1un4po_WBJCFYg) * [Repository](https://github.com/Teradata/r-driver) * [Packages](https://github.com/Teradata/r-driver#Installation) ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources#share-a-data-source) with your collaborators. # Connect to Vertica Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-vertica Use an administrator-created Vertica Data Source in a Domino Project, then access its data and share the Data Source with collaborators. Your [administrator must create a Data Source for this data store](/cloud/admin/data-administration/external-data#add-starburst-jdbc-data-entities) for you to use. After your administrator has created the Data Source, you can work with it in your project as usual. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Access Data Sources from SAS workspaces Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/data-source-from-sas Access Microsoft SQL Server, Oracle, and Databricks Data Sources from SAS Workspaces through ODBC, then troubleshoot common connection errors. You can access [Microsoft SQL Server](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-mssql), [Oracle](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-oracle), and [Databricks](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-databricks) Data Sources from your [SAS Workspaces](/cloud/platform-capabilities/core-concepts/compute-environments/work-with-pluggable-workspaces/sas-workspace). Domino uses the SAS/ACCESS interface to ODBC to access these Data Sources. ## Scope limitations * Domino only supports [Microsoft SQL Server](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-mssql), [Oracle](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-oracle), and [Databricks](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-databricks) Data Sources through the SAS/ACCESS interface to ODBC. * Parameterized queries aren’t supported. ## Prerequisites * Your Data Sources must be created before you launch your Workspace. Restart your Workspace to see new Data Sources. * The environment must have the Arrow Flight SQL ODBC driver installed. To install the Arrow Flight SQL ODBC driver, add the following lines to your Dockerfile. ```dockerfile theme={null} USER root # ODBC Driver for Arrow Flight SQL RUN curl -s -o arrow-flight-sql-odbc-driver.rpm https://download.dremio.com/arrow-flight-sql-odbc-driver/0.9.1/arrow-flight-sql-odbc-driver-0.9.1.168-1.x86_64.rpm RUN dnf clean packages RUN dnf config-manager --add-repo https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/ RUN dnf install -y --nogpgcheck --repo "repo.almalinux.org_almalinux_8_BaseOS_x86_64_os_" libnsl RUN sudo dnf -y --nogpgcheck localinstall arrow-flight-sql-odbc-driver.rpm RUN dnf clean all && rm arrow-flight-sql-odbc-driver.rpm # Configure SAS odbc manager RUN echo "export ODBCSYSINI=/etc" >> /opt/sas/viya/config/etc/workspaceserver/default/workspaceserver_usermods.sh && \ echo "export ODBCINI=odbc.ini" >> /opt/sas/viya/config/etc/workspaceserver/default/workspaceserver_usermods.sh && \ echo "export ODBCINSTINI=odbcinst.ini" >> /opt/sas/viya/config/etc/workspaceserver/default/workspaceserver_usermods.sh && \ echo "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64" >> /opt/sas/viya/config/etc/workspaceserver/default/workspaceserver_usermods.sh USER domino ``` ## Code snippet The following SAS snippet shows you how to access Domino Data Sources using the SAS/ACCESS interface to ODBC and SQL pass-through to connect and send statements directly to the DBMS. Enter your Domino Data Source name in the `datasrc` field. ```sas theme={null} options set=EASYSOFT_UNICODE=YES; proc sql; connect to odbc as mycon(datasrc="sqlserver"); select * from connection to mycon (select top 10 * from yellow_cab); disconnect from mycon; quit; ``` ## Troubleshooting Troubleshoot SAS errors by viewing the error message and stack trace in the SAS Studio UI log. Here are some common errors and solutions: * If a Data Source is created after launching the Workspace, it won’t generate an ODBC configuration causing the error, "Data source name not found and no default driver specified". To resolve the error, restart the Workspace. * The error "Flight returned internal error" indicates issues with the SQL statement or the use of an invalid SQL dialect. ## Next steps * After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources). * [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators. # Domino Data Sources Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/index Compare Domino Data Source connectors with direct connections, identify supported stores, and choose an access method for external data. Domino can connect to your external data sources, such as databases, data warehouses, and data lakes. Domino automatically creates an [audit trail](/cloud/admin/operations/audit-logs/monitor-data-source-logs) for Domino Data Sources to let you audit and track all Data Source-related activities. [Remote data planes](/cloud/platform-capabilities/core-concepts/data-plane) are needed to use External Data Volumes in Domino Cloud. ## Domino Data Source vs. direct connections There are two ways to connect your external data: * **Domino Data Source connectors** are available for some types of data sources. Data Source connectors are the simplest way to connect to supported data sources. It takes just a few clicks to create a Data Source, and you can re-use it in any project. Administrators can [pre-configure a Data Source](/cloud/admin/data-administration/external-data#create-a-data-source) with the connection details and share it, so users supply only their credentials instead of guessing at hostnames or port numbers. * **Direct connections** are available for all types of data sources. This approach is useful if you want to use a data source that is not supported by a Domino connector, or if you want to use a different version of the connector than the one that is installed on the Domino server. However, direct connections require more configuration than Domino connectors and are not officially supported. In a [Domino Nexus deployment](/cloud/admin/architecture-and-deployment/architecture/nexus-hybrid-architecture), Data Sources can be accessed on both the `Local` and remote [data planes](/cloud/platform-capabilities/core-concepts/workspaces/launch-a-workspace), with the exception of Starburst Trino which can only be accessed on the Local data plane. Data sources may not be usable in every data plane due to network restrictions. The table below compares the two methods for accessing external data sources:
Domino Data Source Direct connection

Fetch data from the Data Source into a data frame using SQL.

Fetch data using native library functions.

Optimized for read-heavy workflows.

Data sources support synchronous read/write operations. However, Data Source connectors don’t return metadata about the results of a write operation, such as the number of rows affected.

Write-heavy workflows.

Direct connections can support asynchronous read/write operations

Easy to set up and use.

Once configured a few simple steps or programmatically, you can embed the Data Sources into your notebooks and fetch data into your data frames through SQL.

Use of specialized library functions is a priority.

This can be important in non-traditional data sources or in data lakes, where you might rely on specialized functions to process different shapes of data to embed them into your CI/CD pipelines.

Sharing is a priority.

Domino Data Sources are easy to share with other users across Domino projects. They also support service accounts that authenticate all users, in addition to individual accounts where users provide their own credentials.

Sharing is not a priority.

You must set up connectivity to your Data Sources on your own and explicitly share them with other users.

Easy security configuration.

Domino Data Sources allow for secure safe-keeping of individual and service account credentials in HashiCorp Vault; there is no risk of those secrets being shared with or leaked to other users.

Secure connectivity must be established through custom solutions using Kubernetes secrets or through integration with a centralized vault/safe-keeping mechanism.

Portability is not a priority.

Domino Data Sources do not prioritize support for integrated workflows/pipelines that pull/process data outside of Domino. Although you can call the Domino Data API from outside of Domino, it does not offer the same benefits and safeguards that native libraries provide when talking directly to services outside of Domino.

Portability is a priority.

If you need to reuse your code outside of Domino or you want broad functionality when communicating with your data services from outside of Domino, using native libraries might be preferable.

## Domino connectors Domino comes with connectors for many external data sources. See the full list of supported connectors in the left navigation under Domino Data Sources. ### Starburst JDBC Data Source connectors Only Domino administrators can create [Data Sources powered by Starburst JDBC](/cloud/admin/data-administration/external-data#create-a-starburst-powered-data-source). These extend Domino’s connectivity to data stores such as [ClickHouse](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-clickhouse), [Druid](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-druid), [Greenplum](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-greenplum), [Ignite](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-ignite), [MariaDB](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-mariadb), [SAP HANA 2](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-saphana), [SingleStore](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-singlestore), [Synapse](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-synapse), [Vertica](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-vertica), and [tabular S3 with AWS Glue](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-amazon-s3-with-aws-glue). After your administrator has created the Data Source, [add it to your Project](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) and [share it](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) like any other Data Source. For the full list of data stores compatible with Starburst JDBC drivers, refer to [Starburst’s documentation](https://docs.starburst.io/latest/connector.html). ## Connect directly to an external data source The following data sources are not supported by a Domino Data Source connector, but you can still connect directly to these data sources. Domino does not provide support for any issues related to direct connections. * [DataRobot](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly/connect-to-datarobot) * [Impala](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly/connect-to-impala) ## Next steps [Use Data Sources.](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) # Use Data Sources Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources Create or add Data Sources to Projects, get Python and R code snippets, and use the Domino Data API to query, read, write, and export data. Data sources have a global scope in a Domino deployment and are accessible to anyone with the appropriate permissions in any project. ## Connect to a Data Source Some data stores require additional steps. The [Data Source connector](/cloud/platform-capabilities/core-concepts/data/data-source-connectors) page has more details about specific connections. Data Sources can be set up to use either service account credentials or individual user credentials. Verify the credentials you’ll need with your administrator before connecting to data sources. These steps show you how to connect to a Data Store: 1. From the navigation pane, click **Data** > **Data Sources**. 2. Click **Create a Data Source**. 3. Choose an option from the **Select Data Store** dropdown. 4. Enter credentials for the Data Source and choose from the options. 5. Click **Finish Setup**. ## Add an existing Data Source to a project You can add data sources to a project in two ways. First, you can add a data source directly to the project’s data page. Second, a data source can be added automatically when used in the code within the project. You can add a data source to a project if you have access to that data source and it is set up. This step is not required, but it helps you see which data sources are used in your projects. If you don’t add a Data Source to a project, you can still use it in your code if you have permission to access it. 1. In your project, go to **Data** > **Data Sources** > **Add a Data Source**. 2. Select an existing Data Source from the list. 3. Click **Add to Project**. ## Use the Domino Data API After a Data Source is properly configured, use the [Domino Data API](/cloud/reference/api/data_api) to retrieve data without installing drivers or Data Source-specific libraries. The auto-generated code snippets provided in your workspace are based on the Domino Data API, which supports tabular and file-based Data Sources. The API supports Python and R. The Data API comes pre-packaged in the Domino Standard Environment (DSE). You can [install the Data API](/cloud/reference/api/data_api/install_the_data_api) in custom environments if needed. The Data API’s Data Source client uses environment variables available in the workspace to automatically authenticate your identity. You can override this behavior using [custom authentication](/cloud/reference/api/data_api/datasource_usecases/custom_auth). ### Get code snippets Domino creates code snippets to help you access data sources for your project using the Domino Data API. Code snippets are available for Python and R and customized for tabular and file-based Data Sources. The Data Source must be [added to your project](#add-an-existing-data-source-to-a-project) to enable snippets. Here’s how to get a code snippet that you can copy and paste into your workspace: 1. In your workspace, go to **Data** > **Data Sources**. 2. Click the copy icon to display language options. Code snippet button for Python or R 3. Select **Python** or **R** to copy the code snippet in the desired language. 4. Paste the copied snippet into your own code, and modify it as needed. Domino data sources do not support querying nested objects. The workaround is to [`UNNEST`](https://count.co/sql-resources/bigquery-standard-sql/unnest) the object in the SQL query. The following is an example `UNNEST` query: ```python theme={null} res = ds.query(""" select account_id, t1 from sample_analytics.transactions cross join unnest (transactions) as t(t1, t2, t3, t4, t5, t6) """) ``` ### Query a tabular store You can query a tabular store with the following code, assuming a data source named `redshift-test` is configured with valid credentials for the current user: ```python theme={null} from domino.data_sources import DataSourceClient # instantiate a client and fetch the datasource instance redshift = DataSourceClient().get_datasource("redshift-test") query = """ SELECT firstname, lastname, age FROM employees LIMIT 1000 """ # res is a simple wrapper of the query result res = redshift.query(query) # to_pandas() loads the result into a pandas dataframe df = res.to_pandas() # check the first 10 rows df.head(10) ``` ```r theme={null} library(DominoDataR) client <- DominoDataR::datasource_client() query <- " SELECT firstname, lastname, age FROM employees LIMIT 1000" # table is a https://arrow.apache.org/docs/r/reference/Table-class.html table <- DominoDataR::query(client, "redshift-test", query) #> Table #> 1000 rows x 3 columns #> $firstname #> $lastname #> $age ``` ### Read/write to an object store #### List Get the data source from the client: ```python theme={null} from domino.data_sources import DataSourceClient s3_dev = DataSourceClient().get_datasource("s3-dev") ``` ```r theme={null} library(DominoDataR) client <- DominoDataR::datasource_client() ``` You can list objects available in the data source. You can also specify a prefix: ```python theme={null} objects = s3_dev.list_objects() objects_under_path = s3_dev.list_objects("path_prefix") ``` ```r theme={null} keys <- DominoDataR::list_keys(client, "s3-dev") keys_under_path <- DominoDataR::list_keys(client, "s3-dev", "path_prefix") ``` By default the number of returned objects is limited by the underlying data source. You can specify how many keys you want as an optional parameter: ```python theme={null} objects = s3_dev.list_objects(page_size = 1500) ``` ```r theme={null} keys = DominoDataR::list_keys(client, "s3-dev", page_size = 1500) ``` #### Read You can get object content, without having to create object entities, by using the data source API and specifying the `Object` key name: ```python theme={null} # Get content as binary content = s3_dev.get("key") # Download content to file s3_dev.download_file("key", "./path/to/local/file") # Download content to file-like object f = io.BytesIO() s3_dev.download_fileobj("key", f) ``` ```r theme={null} # Get content as raw vector content <- DominoDataR::get_object(client, "s3-dev", "key") # Get content as character vector content <- DominoDataR::get_object(client, "s3-dev", "key", as = "text") # Download content to file DominoDataR::save_object(client, "s3-dev", "key", "./path/to/local/file") ``` You can also get the data source entity content from an object entity (Python only): ```python theme={null} # Key object my_key = s3_dev.Object("key") # Get content as binary content = my_key.get() # Download content to file my_key.download_file("./path/to/local/file") # Download content to file-like object f = io.BytesIO() my_key.download_fileobj(f) ``` #### Write Similar to the read/get APIs, you can also write data to a specific object key. From the data source: ```python theme={null} # Put binary content to given object key s3_dev.put("key", b"content") # Upload file content to specified object key s3_dev.upload_file("key", "./path/to/local/file") # Upload file-like content to specified object key f = io.BytesIO(b"content") s3_dev.upload_fileobj("key", f) ``` ```r theme={null} # Put raw or character vector to object key DominoDataR::put_object(client, "s3-dev", "key", what = "content") # Upload file content to specified object key DominoDataR::upload_object(client, "s3-dev", "key", file = "./path/to/local/file") ``` You can also write from the object entity (Python only). ```python theme={null} # Key object my_key = s3_dev.Object("key") # Put content as binary my_key.put(b"content") # Upload content from file my_key.upload_file("./path/to/local/file") # Upload content from file-like object f = io.BytesIO() my_key.upload_fileobj(f) ``` ### Write to a local file #### Parquet Because Domino uses [PyArrow](https://arrow.apache.org/docs/python/) to serialize and transport data, the query result is easily written to a local parquet file. You can also use pandas as shown in the CSV example. ```python theme={null} redshift = DataSourceClient().get_datasource("redshift-test") res = redshift.query("SELECT * FROM wines LIMIT 1000") # to_parquet() accepts a path or file-like object # the whole result is loaded and written once res.to_parquet("./wines_1000.parquet") ``` ```r theme={null} client <- DominoDataR::datasource_client() table <- DominoDataR::query(client, "redshift-test", "SELECT* FROM wines LIMIT 1000") # We can use https://arrow.apache.org/docs/r/reference/write_parquet.html since we leverage the arrow library arrow::write_parquet(table, "./wines_1000.parquet") ``` #### CSV Because serializing to a CSV is lossy, Domino recommends using the [Pandas.to\_csv](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html#pandas-dataframe-to-csv) API so you can leverage its multiple options. ```python theme={null} redshift = DataSourceClient().get_datasource("redshift-test") res = redshift.query("SELECT * FROM wines LIMIT 1000") # See Pandas.to_csv documentation for all options csv_options = {header: True, quotechar: "'"} res.to_pandas().to_csv("./wines_1000.csv", **csv_options) ``` ```r theme={null} client <- DominoDataR::datasource_client() table <- DominoDataR::query(client, "redshift-test", "SELECT* FROM wines LIMIT 1000") # We can use https://arrow.apache.org/docs/r/reference/write_csv_arrow.html since we leverage the arrow library arrow::write_csv_arrow(table, "./wines_1000.csv") ``` Your identity is verified automatically to make sure you have the right permissions to use the Domino Data API. The system tries to use a [Domino JWT token](/cloud/reference/api/domino-api-authentication). If that’s not available, it uses a [user API key](/cloud/reference/api/domino-api-authentication) instead. * In a [Domino Nexus deployment](/cloud/admin/architecture-and-deployment/architecture/nexus-hybrid-architecture), Data Sources can be accessed on both the `Local` and remote [data planes](/cloud/platform-capabilities/core-concepts/workspaces/launch-a-workspace), with the exception of Starburst Trino which can only be accessed on the Local data plane. Data sources may not be usable in every data plane due to network restrictions. * Connectivity issues may originate anywhere between your Domino deployment and the external data store. Consult your administrator to verify that the Data Source is accessible from your Domino deployment. ## Next steps * [Create training sets](/cloud/reference/api/data_api/trainingsets_usecases) using the Domino Data API. * [Run or schedule a job](/cloud/platform-capabilities/core-concepts/jobs) to train your model or update your model’s predictions using the latest data. * Learn more about [developing](/cloud/platform-capabilities/features/development) and [deploying models](/cloud/platform-capabilities/features/models) in Domino. * Use [model monitoring](/cloud/platform-capabilities/features/monitoring) to [detect data drift](/cloud/platform-capabilities/features/monitoring/2-data-drift-and-model-quality). # Vector databases Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/data-source-connectors/vector-databases Choose a vector database, generate and index embeddings, configure API access, and retrieve similar data for retrieval augmented generation or recommendations. Vector databases store vector embeddings, which represent data in high-dimensional space, and support the fast similarity searches behind applications such as retrieval augmented generation (RAG), recommender systems, and media recognition. This page outlines how to index, load, and retrieve data from vector databases in Domino. Vector databases provide: * Efficient similarity searches: Quickly find the most similar items in large datasets, which is essential for applications like RAG and personalized recommendation systems. * Scalable infrastructure: Handle large volumes of data and complex query patterns without sacrificing performance. * Enhanced data handling: Store and manage high-dimensional data effectively, optimizing storage and retrieval operations. ## Set up vector databases Set up vector databases in Domino with the following steps: ### Step 1: Choose a vector database Select a vector database that best fits your needs. Domino supports popular vector databases like Pinecone, Qdrant, and others, offering a range of features tailored to different requirements. ### Step 2: Index data * Prepare your data: Organize your data into a suitable format for vectorization. This might involve preprocessing steps like normalization or tokenization, depending on the nature of your data. * Generate embeddings: Use a machine learning model to convert your prepared data into vector embeddings. Domino can facilitate this process through its scalable compute resources and integration with machine learning frameworks. * Load data into the database: Upload the generated embeddings into your chosen vector database. Domino’s job scheduler can automate this process, ensuring data is indexed efficiently and regularly updated as needed. ### Step 3: Integrate a vector database * Configure access: Set up connectivity between Domino and the vector database, ensuring secure and reliable data transfer. * Implement API calls: Use Domino’s APIs to query the vector database directly from your applications or during analytical workflows. ### Step 4: Retrieve data * Execute queries: Perform queries to retrieve data based on similarity or other criteria, integrating these operations within your Domino Workspaces or Runs. * Utilize results: Use the retrieved data to enhance your AI applications, whether it’s generating responses in a RAG setup, recommending products, or recognizing images or videos. ## Use cases * RAG: Enhance chatbots and other generative AI applications by providing contextually relevant data at runtime. * Recommender systems: Improve recommendation accuracy by matching user profiles with products or content based on similarity in vector space. * Media recognition: Quickly identify and classify media files by comparing embeddings generated from audio or video content. ## Next steps Find out how to connect to [Pinecone](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-pinecone) and [Qdrant](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-qdrant). # Create and manage Datasets Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/datasets/create-and-manage-datasets Create Domino Datasets through the UI, SDK, or API, then upload, download, rename, delete, share, and refresh their files with scheduled Jobs. Create Datasets, control who can access them, and manage their files, snapshots, and settings. A Dataset always reflects the most recent version of the data. For reproducibility, you can create read-only snapshots of your Dataset at any moment in time. Snapshots are associated with the Dataset they version. ## Create a new Dataset If the Dataset you need is not yet in Domino, you can create it in your Project: 1. In your Project, go to **Data** > **Domino Datasets** > **Create New Dataset**. 2. Enter a **Dataset Name** and **Description**, then click **Next**. 3. Enter the users or organizations to give them permission to the Dataset. To give all Project members access to the Dataset, click the **Add all project members** link. 4. Specify the user or organization's [role](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets). 5. Click **Add**. 6. Repeat steps 3-5 as needed. In the **Current Permissions** area, you can modify the [role](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets) as needed, or click the trash icon to delete permissions. 7. Click **Finish**. You can use the [python-domino library](/cloud/reference/python-sdk/python-domino) to create a Dataset using `datasets_create`: ```python theme={null} datasets_create(dataset_name, dataset_description) ``` * `dataset_name`: Name of the new Dataset. The name must be unique. * `dataset_description`: Description of the Dataset. Endpoint: ``` /api/datasetrw/v1/datasets ``` Body: ```json theme={null} { "name": "", "description": "", "projectId": "", "grants": [] } ``` Example: Example request: ```python theme={null} import requests import json url = "test14995.test-api.tech/api/datasetrw/v1/datasets" payload = json.dumps({ "name": "test-dataset4", "description": "A new dataset", "projectId": "649cb3b0dab75c31b6e9daf6", "grants": [] }) headers = { 'X-Domino-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` Example response: ```json theme={null} { "dataset": { "id": "649cb4dedeb75c31b6e7dafc", "name": "test-dataset4", "description": "A new dataset", "projectId": "649cb3b0dab75c31b6e9daf6", "createdAt": "2023-06-28T22:31:58.042Z", "snapshotIds": [ "649cb4dedeb75c31b6e7dafb" ], "tags": {} }, "metadata": { "requestId": "956ef589-8f4d-4c6d-b7f3-1c28d0201248", "notices": [] } } ``` ### Create a new Dataset from a snapshot Snapshots are read-only. To iterate on one, create a new Dataset from it, modify the new Dataset, and take a new snapshot. See [Create a new Dataset from a snapshot](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots#create-a-new-dataset-from-a-snapshot) for the UI, CLI, and API steps. ### Upload files to a Dataset Use the Domino UI to upload up to 50 GB or 50,000 individual files. For larger uploads, use the Domino CLI for your upload. 1. In your Project, go to **Data** > **Domino Datasets**. 2. Open the Dataset to which you want to add files, then click **Upload files**: Upload files to a Dataset You can browse your local filesystem or drag and drop files to upload. To preserve the filesystem structure of your uploads, use the drag-and-drop option. You can pause and resume the upload as needed. Uploading to a folder can fail if you do not have permissions to write to it. For example, a folder created from a Workspace might not be writable through the UI without appropriate changes to permissions. Upload all the files in a folder from your local machine to an existing dataset. This command overwrites existing files unless you use the `‑‑fileUploadSetting` option. Syntax: ```shell theme={null} domino [--fileUploadSetting Ignore|Overwrite|Rename] [--targetRelativePath ] // ``` The optional `fileUploadSetting` flag handles path collisions: * `Ignore`: If a file already exists in the Dataset, ignore the new file. * `Overwrite`: If a file already exists in the Dataset, overwrite the existing file with the new file. * `Rename`: If a file already exists in the Dataset, append `_1` to the uploaded filename. For example, if `/Users/myUser/data/file.txt` already exists then the newly uploaded file becomes `/Users/myUser/data/file_1.txt`. The optional `targetRelativePath` flag enables uploading to a subdirectory in the Dataset: * ``: This is the path, relative to the root directory of the Dataset, where files are uploaded. Note that other users with access to the Dataset can alter the file structure, which may require you to modify the destination path accordingly. If `targetRelativePath` is not specified, files are uploaded to the root directory of the Dataset. `fileUploadSetting`, `targetRelativePath`, and their values are case-sensitive. Example: ```shell theme={null} domino upload-dataset --fileUploadSetting Overwrite --targetRelativePath Experiments/Run1/Analysis jsmith/global-predictions/global-data /Users/myUser/data ``` If you don't have the CLI installed, see [Install the Domino Command Line (CLI)](/cloud/reference/cli/install-the-cli) for instructions. ### Download files from Datasets Use the Domino UI or CLI to download files and folders from your Projects. 1. In your Project, go to **Data** > **Domino Datasets**. 2. Open the Dataset you want to download files from. 3. Navigate to the directory where your files are located. 4. Either: * Click the vertical dots next to the file or folder you want to download. Click **Download**. If you are downloading a folder, the downloaded file is a ZIP or TAR archive, which can be toggled via the `com.cerebro.domino.dataset.batchDownloadArchiveFormat` configuration record key. Otherwise, the file downloads directly. * Click the checkboxes to the left of the files and directories you want to download, and then click **Download Selected Items**. If you are downloading a folder or multiple files, the downloaded file is a ZIP file (default) or TAR archive, which can be toggled via the `com.cerebro.domino.dataset.batchDownloadArchiveFormat` configuration record key. Otherwise, the file downloads directly. `download` downloads the latest copy of your files from the cloud into your current project folder. If you have made changes that conflict with changes in the cloud, you see both versions of the conflicting file side-by-side. There are two reasons files in the cloud might change: first, your collaborators on a Project might make changes; second, you might have executed a run that produced new output files. Example ```shell theme={null} domino download ``` To download the output files of the given run, please see the [Download files with the CLI](/cloud/reference/cli/download-files-with-the-cli) page. If you don't have the CLI installed, see [Install the Domino Command Line (CLI)](/cloud/reference/cli/install-the-cli) for instructions. ## Modify Datasets You can always modify the contents of a Dataset or rename the Dataset. Always create a snapshot before modifying the contents of a Dataset so that you can always return to the previous version of the data. ### Rename a Dataset You can change the name of a Dataset. 1. In the navigation pane, click **Data**. 2. Click **Domino Datasets**. 3. Click the Dataset to rename. 4. Go to **More Actions > Rename Dataset**. 5. Enter a **New Name** and click **Rename**. ### Delete a Dataset If you no longer need the entire Dataset, you can mark it for deletion. When you mark a Dataset for deletion, it removes the Dataset and its associated snapshots from the originating Project and from all projects that it was shared with. Domino executions cannot use the Dataset. A Domino administrator must perform the final deletion. 1. In the navigation pane, click **Data**. 2. Click **Domino Datasets**. 3. Click the name of the Dataset to delete. 4. Go to **More Actions** > Click **Delete Dataset**. 5. Click **Delete Dataset** to confirm that you want to mark the Dataset for deletion. Your administrator must permanently [delete the Dataset](/cloud/admin/data-administration/datasets#delete-datasets-and-snapshots). ### Add or remove files You can add or delete files in a Dataset using the Domino UI. With the CLI, you can add all the files in a folder to a Dataset. In the navigation pane, click **Data**, then click the name of the Dataset to change. * To add files, click **Upload files**. * To delete files, select the files to delete, then click **Delete Selected Items**. * To rename the Dataset, click **Rename Dataset**, enter the new name, then click **Rename**. Before deleting a file with a special character like a backslash () in its name, you need to rename it first. You can use a tilde (\~) or colon (:) anywhere in a filename, except at the beginning. If the file that you want to delete has a tilde or colon at the beginning of its name, rename it. To add all the files in a folder, use the same `domino upload-dataset` command and options described in [Upload files to a Dataset](#upload-files-to-a-dataset). ### Rename files and folders You can change the name of the latest version of a file or folder in a Dataset. Domino also does not rename files or folders in snapshots. You must update references to the original file or folder. If you don't, your Project might not work. For example, you might see inconsistencies in text files and documentation. 1. Go to a Project that uses a Dataset. 2. In the navigation pane, click **Data**. 3. To rename the file or folder, go to the end of the row and click the three vertical dots. 4. Click **Rename**. 5. In the Rename window, enter the **New Name** and click **Rename**. ## Schedule Jobs to update a Dataset If you have data in an external source from which you want to periodically fetch and load into Domino, you can set up [scheduled jobs](/cloud/platform-capabilities/core-concepts/jobs/schedule-a-job) to write to Datasets. Suppose you have data stored in an [external Data Source](/cloud/platform-capabilities/features/monitoring/4-set-up-model-monitor/2-connect-a-data-source) that is periodically updated. If you wanted to fetch the latest state of that file once a week and load it into a Domino Dataset, you could set up a scheduled Run: 1. Create a Dataset to store the data from the external source. 2. Write a script that fetches the data and writes it to the Dataset. 3. Create a scheduled Job to run your script with the new Dataset configuration. The following is a detailed example showing how to fetch a large, dynamic data file from a [private S3 bucket](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/connect-to-generic-s3) with a scheduled Run once a week. 4. Create a Dataset to hold the file. This example shows the Dataset named `fetched-from-s3`. Best practices to fetch Datasets from S3 For this example, assume the S3 bucket is named `my_bucket` and the file you want is named `some_data.csv`. You can set up your script like this: fetch-data.py ```shell theme={null} import boto3 import io # Create new S3 client client = boto3.client('s3') # Download some_data.csv from my_bucket and write to latest-S3 output mount file = client.download_file('my_bucket', 'some_data.csv', '/domino/datasets/fetched-from-s3/some_data.csv') ``` 5. Set up a [scheduled Job](/cloud/platform-capabilities/core-concepts/jobs/schedule-a-job) that executes this script once a week with the correct Dataset configuration. ## Next steps * [Find a Dataset's path](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots) * [Create and manage Dataset snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots) * [Manage large Datasets](/cloud/platform-capabilities/core-concepts/data/datasets/manage-large-data) * [Share a Dataset](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets) # Work with Domino Datasets Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/datasets/index Use Domino Datasets as versioned filesystem storage, share and mount them across Projects, and preserve reproducible data with snapshots. Domino Datasets provide high-performance, versioned, and structured filesystem storage in Domino. You can use Datasets to build multiple curated collections of data in one project and share them with your collaborators to use in their projects. Likewise, you can mount Datasets from other projects in your own project if they are shared with you. You can modify the contents of a Dataset through the Domino application or through executions. A Dataset always reflects the most recent version of the data. For reproducibility, you can create read-only snapshots of your Dataset at any moment in time. Snapshots are useful when you need to ensure that the data you’re working on does not change. Datasets mount into Workspaces, Jobs, Launchers, and Apps, and your code reads and writes them as ordinary directories: `/domino/datasets/local/` in DFS Projects, `/mnt/data/` in Git-based Projects (see [Use Datasets and snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots) for the full path scheme). Snapshots count toward your storage, so delete the ones you no longer need. Sharing is zero-copy: every Project mounts the same files rather than receiving a copy, so a Dataset [shared read-only](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets) works as a controlled distribution mechanism for curated data products. The topics in this section show you how to use Datasets in your projects. [Create and manage Datasets](/cloud/platform-capabilities/core-concepts/data/datasets/create-and-manage-datasets)\ Find shared Datasets and make them part of your project. [Use Datasets and Snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots)\ Use the Dataset’s path to access the Dataset from your code. [Version data with Snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots)\ Create a read-only, immutable version of the Dataset. Add tags to create a friendly, stable path to snapshots that hold the desired state for your data. [Work with local data](/cloud/platform-capabilities/core-concepts/data/datasets/local-data)\ Store data in a Domino Dataset and reserve your project files for the scripts and documents that you want to work with locally. [Manage large Datasets](/cloud/platform-capabilities/core-concepts/data/datasets/manage-large-data)\ Use Domino Datasets or Project data compression to handle large data. # Work with local data Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/datasets/local-data Move large data files from Project files into Domino Datasets to speed local CLI download and sync operations while keeping code paths current. If you use the [Domino CLI](/cloud/reference/cli/install-the-cli) to work with projects on your local machine, you might find that storing large data files slows your [download](/cloud/reference/cli/cli-reference#download-the-latest-version-of-your-files) and [sync](/cloud/reference/cli/cli-reference#synchronize-the-files-on-your-computer-with-the-server) operations, and fills up a lot of your local disk storage. To prevent this, store data in a Domino Dataset, and reserve your project files for the scripts and documents that you want to work with locally. In a [Domino Nexus deployment](/cloud/admin/architecture-and-deployment/architecture/nexus-hybrid-architecture), CLI access to Datasets is only available in the `Local` [data plane](/cloud/platform-capabilities/core-concepts/data-plane). To simplify your local workflow: 1. [Create a Dataset](/cloud/platform-capabilities/core-concepts/data/datasets/create-and-manage-datasets) in your project, and write your large data files to it. 2. After the files have been written to the Dataset, remove them from your project files. 3. [Fetch](/cloud/reference/cli/cli-reference#get-a-project-from-the-server-onto-your-computer-for-the-first-time) a clean, lighter-weight copy of your project. 4. Update your code to reference your data files in their new location, at: `/domino/datasets/local//` 5. When everything is working properly, delete copies of the project that have the large data files in them from your local machine. ## Next steps * [Get the path to a snapshot](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots) * Learn [how Domino handles large Datasets](/cloud/platform-capabilities/core-concepts/data/datasets/manage-large-data) # How Domino handles large Datasets Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/datasets/manage-large-data Choose Domino Datasets for large static data or Project data compression for dynamic data, then monitor storage quotas and usage. When you start an execution, Domino copies your project files to the executor that is hosting the execution. After every execution in Domino, by default, Domino tries to write all files in the working directory back to the project as a new revision. When working with large volumes of data, this presents two potential problems: * The number of files that are written back to the project might exceed the configurable limit. By default, the file limit for Domino project files is 10,000 files. * The time required for the write process is proportional to the size of the data. It can take a long time if the size of the data is large. The following table shows the recommended solutions for these problems. They are described in further detail after the table. | Case | Data size | # of files | Static / Dynamic | Solution | | - | - | - | - | - | | Large volume of **static** data | Unlimited | Unlimited | Static | Domino Datasets | | Large volume of **dynamic** data | Up to 300 GB | Unlimited | Dynamic | Project Data Compression | "Unlimited" means Domino sets no cap: the ceiling is whatever storage backs Datasets in your deployment, so check that provider's documentation for the figure that applies to you. Cost still grows with the data and snapshots you keep, so delete what you no longer need. Beyond a few terabytes, consider keeping bulk data in object storage such as Amazon S3 through a [Data Source connector](/cloud/platform-capabilities/core-concepts/data/data-source-connectors). Administrators can also cap per-user storage, as described in [Dataset quotas and limits](#dataset-quotas-and-limits). ## Domino Datasets When working on image recognition or image classification deep learning projects, you often need a training Dataset of thousands of images. The total Dataset size can easily become tens of GB. For these types of projects, the initial training also uses a static Dataset. The data is not constantly being changed or updated. Furthermore, the actual data that is used is normally processed into a single large tensor. Store your processed data in a Domino Dataset. Datasets can be mounted by other Domino projects, where they are attached as a read-only network filesystem to that project’s runs and workspaces. ## Project data compression Sometimes, you must work with logs as raw text files. Typically, new log files are constantly being updated, so your Dataset is dynamic. You might encounter both problems described previously at the same time: 1. The number of files are over the 10k limit. 2. There are long times to prepare and sync data. Domino recommends that you store these files in a compressed format. If you need the files to be in an uncompressed format during your Run, you can use Domino Compute Environments to prepare the files. In the pre-run script, you can uncompress your files: ```shell theme={null} tar -xvzf many_files_compressed.tar.gz ``` Then in the post-run script, you can re-compress the directory: ```shell theme={null} tar -cvzf many_files_compressed.tar.gz /path/to/directory-or-file ``` If your compressed file is still large, the time to prepare and sync might still be long, depending on how large your compressed file is. Consider storing these files in a [Domino Dataset](/cloud/platform-capabilities/core-concepts/data/datasets/create-and-manage-datasets) to minimize the time to copy. ## Dataset quotas and limits Admins can [set quotas and limits on Dataset storage](/cloud/admin/data-administration/datasets#set-limits-on-dataset-usage) in configuration records. Contact your admin to configure quotas. As you approach your quota limit, you receive notifications, emails, and warnings on Dataset pages. Your Dataset storage usage is the sum of the size of all active Datasets that you own. If a Dataset has multiple owners, then the size of that Dataset counts towards the storage usage of each owner. For more information, see [Dataset roles](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets#dataset-roles). ## Next steps * [Get the path to a snapshot](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots) * Learn about [Dataset best practices](/cloud/platform-capabilities/core-concepts/data/datasets/local-data) # Use Datasets and snapshots Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots Mount shared Domino Datasets, preview file formats, choose snapshots for executions, and use the correct paths in Domino File System or Git-based Projects. Domino Datasets provide easy-to-use, fast, and organized storage for files in the Domino platform. You can create different sets of data within a project and share them with your teammates. If you mount a Dataset, others can use it in their own projects. If someone shares their Datasets with you, you can also mount them for use in your own project. ## Mount a Dataset To mount a Dataset, you’ll need the appropriate [Dataset role](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets#dataset-roles) and you must be [an owner or contributor](/cloud/platform-capabilities/core-concepts/projects/collaborate-on-projects) on the Project to which you want to mount the Dataset. 1. Launch Domino and open the **Project** that you want to work with. 2. From the left navigation pane, click **Data** > **Datasets**. 3. On the **Domino Datasets** page, click the **Mount Shared Dataset** button. 4. Choose the Dataset that you want to mount from the **Dataset Name** menu, then click **Mount Dataset**. The Dataset that you selected should now appear in the **Shared Datasets** list. You can find the directory path for that Dataset under **Name**. Datasets (both imported and standard) are mounted as read-write (RW) or read-only (RO) based on the role of the user running the execution. ## Unmount a shared Dataset Unmounting a shared Dataset does not remove it from existing executions until the execution completes. However, the Dataset is not available for new executions in this Project. To unmount a Dataset, you’ll need the appropriate [Dataset role](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets#dataset-roles) and you must be [an owner or contributor](/cloud/platform-capabilities/core-concepts/projects/collaborate-on-projects) on the Project from which you want to unmount the Dataset. 1. Open the **Project** that you want to unmount the Dataset from. 2. From the left navigation pane, click **Data** > **Datasets**. 3. Look for the Dataset you want to unmount in the **Domino Dataset** list. 4. At the end of its row, click the three vertical dots and click **Unmount**. ## Render a Dataset Domino supports tabulated previews for a number of file formats to streamline your data analysis and workflows. This minimizes downloading files and artifacts from Domino, while keeping sensitive data inside the Domino platform. As a prerequisite for viewing in a tabulated format, make sure that the **Define.xml** file and its associated **style sheet (.xsl file)** are in the same directory. There are a couple of ways to view these: * From within a **Domino Dataset**: Double-click the **Define.xml** file to render it in a readable format. * From within Domino artifacts: * View **Styled XML**: click **Show Rendered XML** to render it in a readable format. These are the supported file types for rendering:
File formats File types

Microsoft Office

  • .doc, .docx, .ppt, .pptx, .xls, .xlsx

OpenDocument

  • .odg, .odp, .ods, .odt

Other

  • .csv, .pdf, .rtf, .xml

SAS

  • .sas7bdat

## Choose which Datasets and snapshots to mount By default, every Dataset attached to a Project mounts into your executions with all of its snapshots at their versioned paths (see [Understand Dataset paths](#understand-dataset-paths) below). You can pin any one of them to a single snapshot instead, for the length of that execution. Do it on the **Data Plane & Hardware** tab when you launch a Workspace or Job, or when you define a scheduled Job. Domino lists each mounted Dataset and NetApp Volume there in a table with **Storage** and **Snapshot** columns, and the **Snapshot** column is where you pick. A pinned snapshot mounts read-only at the path the live Dataset normally uses, for example `/domino/datasets/local/`, so your existing code paths keep working. [Choose a snapshot per asset at launch](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots#choose-a-snapshot-per-asset-at-launch) covers every option, how long the selection lasts, and what changes about the asset's other mounts. ## Find a Dataset path to access it in your code To access a Dataset or a snapshot in your code, you need to know its path. There are several ways to find the path to a Dataset or any of its snapshots in Domino. * From a Workspace: * [Before launching a Workspace](/cloud/platform-capabilities/core-concepts/workspaces/launch-a-workspace): from the left navigation, click **Workspaces** > **Settings**. * In a [running Workspace](/cloud/platform-capabilities/core-concepts/workspaces/manage-workspaces): from the left navigation, click **Data** > **Datasets**. * From a Job: * When [launching a Job](/cloud/platform-capabilities/core-concepts/jobs/create-and-run-jobs): from the left navigation, click **Jobs**, choose the job from the list, then click **Details** > **Data**. * In a running Job, click **Details** > **Data**. ## Understand Dataset paths Domino executions (workspaces, jobs, apps, and launchers) automatically make Datasets and their associated snapshots from a Project available. The following configuration demonstrates the conventions followed by a predefined path: * Dataset called `clapton` (local to the project) * Snapshot 1 (tagged with `tag1`) * Snapshot 2 (not tagged) * Dataset called `mingus` (local to project) * Snapshot 1 (tagged with `tag2`) * Snapshot 2 (not tagged) * Dataset called `ella` (shared from another project) * Snapshot 1 (tagged with `tag3`) * Snapshot 2 (not tagged) * Dataset called `davis` (shared from another project) * Snapshot 1 (tagged with `tag4`) * Snapshot 2 (not tagged) ### Dataset paths in DFS projects The mounting paths in DFS projects behave according to the following scheme: **Dataset in the project:** * `/domino/datasets/local/` - mounted as RW * `/domino/datasets/local/snapshots//` - mounted as RO * `/domino/datasets/local/snapshots//1` - mounted as RO * `/domino/datasets/local/snapshots//2` - mounted as RO **Dataset imported from a different project:** * `/domino/datasets/` - mounted as RO * `/domino/datasets/snapshots//` - mounted as RO * `/domino/datasets/snapshots//1` - mounted as RO * `/domino/datasets/snapshots//2` - mounted as RO For a Domino File System (DFS) project, Datasets and snapshots are available in the following hierarchy: ```console theme={null} /domino |--/datasets |--/local <== Local datasets and snapshots |--/clapton <== Read-write dataset for owner and editor, read-only for reader |--/mingus <== Read-write dataset for owner and editor, read-only for reader |--/snapshots <== Snapshot folder organized by dataset |--/clapton <== Read-write for owner and editor, read-only for reader |--/tag1 <== Mounted under latest tag |--/1 <== Always mounted under the snapshot number |--/2 |--/mingus |--/tag2 |--/1 |--/2 |--/ella <== Read-write shared dataset for owner and editor, Read-only for reader |--/davis <== Read-write shared dataset for owner and editor, Read-only for reader |--/snapshots <== Shared datasets snapshots organized by dataset |--/ella <== Read-write for owner and editor, read-only for reader |--/tag3 <== Mounted under latest tag |--/1 <== Always mounted under the snapshot number |--/2 |--/davis |--/tag4 |--/1 |--/2 ``` ### Dataset paths in Git-based projects The mounting paths in Git-based projects behave according to the following scheme: **Dataset in the project:** * `/mnt/data/` - mounted as RW * `/mnt/data/snapshots//` - mounted as RO * `/mnt/data/snapshots//1` - mounted as RO * `/mnt/data/snapshots//2` - mounted as RO **Dataset imported from a different project:** * `/mnt/imported/data/` - mounted as RO * `/mnt/imported/data/snapshots//` - mounted as RO * `/mnt/imported/data/snapshots//1` - mounted as RO * `/mnt/imported/data/snapshots//2` - mounted as RO For Git-based Projects, the Datasets and snapshots are available in the following hierarchy: ```console theme={null} /mnt |--/data <== Local datasets and snapshots |--/clapton <== Read-write dataset for owner and editor, read-only for reader |--/mingus <== Read-write dataset for owner and editor, read-only for reader |--/snapshots <== Snapshot folder organized by dataset |--/clapton <== Read-write for owner and editor, read-only for reader |--/tag1 <== Mounted under latest tag |--/1 <== Always mounted under the snapshot number |--/2 |--/mingus |--/tag2 |--/1 |--/2 |--/imported |--/data |--/ella <== Read-write shared dataset for owner and editor, read-only for reader |--/davis <== Read-write shared dataset for owner and editor, read-only for reader |--/snapshots <== Shared dataset snapshots organized by dataset |--/ella <== Read-write for owner and editor, read-only for reader |--/tag3 <== Mounted under latest tag |--/1 <== Always mounted under the snapshot number |--/2 |--/davis |--/tag4 |--/1 |--/2 ``` ## Next steps * [Create and manage Dataset Snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots) for data reproducibility. * Learn about [Dataset best practices](/cloud/platform-capabilities/core-concepts/data/datasets/local-data). # Version data with Snapshots Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots Create, tag, mount, pin, download, and delete snapshots for Domino Datasets and NetApp Volumes, or build a new Dataset from a snapshot. Domino lets you create snapshots of both NetApp Volumes and Domino Datasets to support reproducibility, version control, and collaboration. A snapshot is a read-only, immutable record of your data at a specific point in time. You can tag snapshots, download them, or use them to create versions. You can also add commit messages to NetApp Volumes only. When you want to reproduce a training experiment, you can version a NetApp Volume or Domino Dataset so that you can return to a specific version used in the past. To do this with Domino: * Create a snapshot to create versions of a NetApp Volume or Domino Dataset. * Use a naming convention and a folder hierarchy to organize data your way in the read/write portions of a NetApp Volume or Dataset. ## Snapshotting: NetApp Volumes vs. Domino Datasets | Feature | NetApp Volumes | Domino Datasets | | - | - | - | | **Snapshot speed** | Nearly instant, regardless of size (\~3 sec for 100+ GB) | Time scales with size (seconds to hours) | | **Storage efficiency** | Snapshots initially consume no extra space (redirect-on-write) | Snapshots duplicate physical data at snapshot time | | **Mounting in executions** | Mounted like datasets; supports tag-based mounting | Mounted like volumes; supports tag-based mounting | | **Tag support** | Yes | Yes | | **Commit messages** | Yes | No - not supported | | **Writable after snapshot** | No - read-only; cannot clone snapshot into a new volume | Yes - can create a **new** Dataset from a snapshot; original snapshot remains read-only | Use **NetApp Volumes** when you need fast, large-scale snapshotting or integration with external storage systems. Use **Datasets** if you don't have NetApp Volumes set up, and you want to clone or branch datasets more flexibly within Domino. ## Create a snapshot You can take a snapshot from the overview page of a NetApp Volume or Dataset in the Domino UI. A snapshot captures the current state of the data in a read-only, versioned format. **Caution:** You should never modify files while a snapshot is in progress. 1. Go to the **NetApp Volumes** or **Datasets** tab in your project. 2. Select the NetApp Volume or Dataset you want to snapshot. 3. Click **Take Snapshot** and choose one of the following: * **Include all files**: snapshots the entire contents. * **Include only selected files** allows a partial snapshot. 4. Optionally, add a commit message (NetApp Volumes) or a tag name for the snapshot. You can add multiple tags for NetApp Volumes. 5. Click **Confirm** to begin. Syntax: ```shell theme={null} domino create-snapshot // ``` Domino NetApp Volume Apis /snapshots/\{id} in the [Domino NetApp Volume APIs documentation](/cloud/reference/api/domino-volumes-api) has details on how to do this. Endpoint: ``` /api/datasetrw/v1/datasets//snapshots ``` Body: ```json theme={null} { "relativeFilePaths": [ "string" ] } ``` Example: Snapshot all files in the Dataset Request: ```python theme={null} import requests import json url = "test14995.test-api.tech/api/datasetrw/v1/datasets/649cb4dedeb75c31b6e7dafc/snapshots" payload = json.dumps({ "relativeFilePaths": [ "/*" ] }) headers = { 'X-Domino-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` Response: ```json theme={null} { "snapshot": { "id": "64935f78867ba25a6903c6c4", "datasetId": "6488daa88548661d66844e23", "creatorId": "64876299e4941004222e2b93", "createdAt": "2023-06-21T20:37:12.95Z", "status": "pending" }, "metadata": { "requestId": "adc8ecc5-9887-46ef-a38c-5569311bf4cd", "notices": [] } } ``` ## Commit messages (NetApp Volumes only) A commit message is a short, optional description attached to a snapshot. This description is also editable. It's useful for recording the purpose, contents, or context of the snapshot, especially when creating many versions over time. Examples: * "Cleaned version with NA values removed" * "Post-labeling data for training 3.2" * "Before joining with demographic.csv" Commit messages help: * Track what changed * Clarify the purpose without editing the Dataset or Volume description * Improve transparency in team workflows ## Add tags to a snapshot Tags are human-readable labels that provide a stable, friendly path to a specific snapshot when you mount it in an execution. They let you reference a named snapshot in code or across projects, even if the tag later moves to a different snapshot. * Tags can be created or removed by NetApp Volume or Dataset owners or editors. * Tags can be reassigned to newer snapshots as needed. * Only the **most recently added tag** is used for automatic mounting in executions. To add or remove a tag: 1. Go to the **Snapshots** section for the Dataset or Volume. 2. Select the snapshot. 3. Click **+Tag Snapshot**, enter a name, and click **Add**. 4. To remove a tag, click the **X** next to the tag name. ## Snapshot mounting in executions If a snapshot has a tag, Domino automatically mounts it in any execution that uses the NetApp Volume or Dataset. If a snapshot has multiple tags, only the most recently added one is mounted. This mount path is in addition to the default mount, and it depends on the data and project types: NetApp Volumes * **Git-based projects** - `/mnt/netapp-volumes/snapshot-tags//` * **Regular projects** - `/domino/netapp-volumes/snapshot-tags//` Datasets * **Git-based projects** - `/mnt/data/snapshots//` * **Regular projects** - `/domino/datasets/local/snapshots//` Datasets imported from another project use a different prefix. [Understand Dataset paths](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots#understand-dataset-paths) lists every form. Pinning an asset to one snapshot changes this: a pinned Dataset gets no tag mount, while a pinned NetApp Volume keeps its tag mounts. [Choose a snapshot per asset at launch](#choose-a-snapshot-per-asset-at-launch) has the details. ## Choose a snapshot per asset at launch When you launch a Workspace or Job, or define a scheduled Job, you can pin each mounted NetApp Volume or Dataset to a single snapshot. Pin a snapshot to work against known-good data instead of the live version, without moving tags. 1. Start a new Workspace or Job from your Project, or create a scheduled Job. 2. Open the **Data Plane & Hardware** tab. Domino lists each mounted NetApp Volume and Dataset in a table with **Storage** and **Snapshot** columns. 3. In the **Snapshot** column for an asset, choose one of: * **All snapshots**, the default: mounts the asset the standard way, with its live data, every snapshot under its own snapshot number, and any tag mounts. * A **specific snapshot**, listed as `Snapshot # - `: mounts that one version, read-only. 4. Repeat for any other mounted assets, then launch or save. The picker has no tag option. Domino mounts tagged snapshots automatically, as described in [Snapshot mounting in executions](#snapshot-mounting-in-executions), except for a Dataset you pin. A pinned snapshot takes over the path the asset normally mounts at, read-only, so there is no separate `snapshots/` path to read it from. Pinning also changes which other mounts the asset gets: | Asset | Pinned snapshot mounts at | What else changes | | :- | :- | :- | | Dataset | `/domino/datasets/local/`, or `/mnt/data/` in a Git-based project, the same path the live data normally uses | Domino collapses the version and tag paths into it, so nothing mounts under `snapshots//`, neither the numbered versions nor the tag | | NetApp Volume | `/domino/netapp-volumes/`, or `/mnt/netapp-volumes/` in a Git-based project | The read/write mount and the `snapshots/` directory are disabled. Tag mounts under `snapshot-tags//` stay | How long the selection lasts depends on what you launch: | Execution type | The selection applies to | | :- | :- | | Workspace | Every restart of that Workspace, until you change it | | One-off Job | That run only | | Scheduled Job | Every run the schedule triggers | ## Create a new Dataset from a snapshot You can create as many snapshots as you need, but existing snapshots are read-only. **Note:** You can't create a new NetApp Volume directly from a snapshot, but you can copy a volume for use in Project Templates, which includes its existing snapshots. You can create a new Dataset from a snapshot, modify it, and take a new snapshot: 1. Go to the existing snapshot. 2. Click **Copy to New Dataset**. 3. Complete the fields as needed. 4. Click **Upload files** to add files to the Dataset. 5. Click **Take Snapshot** > **Include all files**. Syntax: ```shell theme={null} domino create-dataset-from-snapshot // ``` Endpoint: ``` /api/datasetrw/v1/datasets ``` Body: ```json theme={null} { "name": "test-dataset5", "description": "A new dataset based on a snapshot", "grants": [], "snapshotId": "649cbe38fe7c5443a9cb1b62" } ``` Example: Create a new Dataset from a snapshot Example request: ```python theme={null} import requests import json url = "test14995.test-api.tech/api/datasetrw/v1/datasets" payload = json.dumps({ "name": "test-dataset5", "description": "A new dataset based on a snapshot", "grants": [], "snapshotId": "649cbe38fa7c5443a7cb1b62" }) headers = { 'X-Domino-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` Example response: ```json theme={null} { "dataset": { "id": "649cb689deb75c31b6e7dafe", "name": "test-dataset5", "description": "A new dataset based on a snapshot", "projectId": "649cb2b0deb75c31b6e7daf6", "createdAt": "2023-06-28T22:39:05.788Z", "snapshotIds": [ "649cb689deb75c31b6e7dafd" ], "tags": {} }, "metadata": { "requestId": "3d87b111-8052-4965-9044-0531ba49a93a", "notices": [] } } ``` ## Download a snapshot You can download a snapshot: 1. Open the overview page for the Dataset or Volume. 2. In the **Snapshots** list, select the snapshot to download. 3. Click **Download Snapshot** to begin downloading. * If the selected snapshot contains a folder or multiple files, it downloads as a `.zip` file (default) or `.tar` archive, depending on your system setting. Download Dataset snapshot button ## Delete a snapshot Deletion behavior depends on the volume type and configuration. ### Delete a NetApp Volume snapshot Admins can directly delete snapshots for both NetApp Volumes and Datasets from the Admin UI. [Delete a NetApp Volume](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes) has information about deleting NetApp Volumes. ### Delete a Dataset snapshot Marked snapshots are no longer mounted in executions and are flagged for admin removal. You can restore a snapshot if it is marked for deletion. They are not fully deleted until removed by a Domino admin. 1. Open the NetApp Volume or Dataset overview page. 2. Go to the **Snapshots** section. 3. Select the snapshot to delete. 4. Click **Mark Snapshot for Deletion**, then confirm. ## Next steps * [Get the path to a snapshot](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots) * Learn about [Dataset best practices](/cloud/platform-capabilities/core-concepts/data/datasets/local-data) # External Data Volumes (EDVs) Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/external-volumes/index Use External Data Volumes to mount Network File Systems, AWS EFS, or Windows Share storage in Projects and understand execution support and limitations. External Data Volumes (EDVs) are volumes from network-attached storage systems that are mounted to the Domino system. Domino can register EDVs and attach them to projects. When an EDV is attached to a project, Domino mounts its file system when running code in that project (such as in a workspace or a job). Once an EDV is [registered by a Domino admin](/cloud/admin/data-administration/external-data/external-data-volumes#register-external-data-volumes), Domino automatically mounts it and you can [add it to your project](/cloud/platform-capabilities/core-concepts/data/external-volumes/use-a-mounted-volume). EDV mounted in Domino [Remote data planes](/cloud/platform-capabilities/core-concepts/data-plane) are needed to use External Data Volumes in Domino Cloud. ## Supported EDV types Domino supports the following data volumes: * Network File Systems (generic NFS and AWS EFS) * Windows Share (SMB) ## EDV support in Domino executions External Data Volumes are supported in the following Domino executions: * [Jobs](/cloud/platform-capabilities/core-concepts/jobs) (including [Scheduled Jobs](/cloud/platform-capabilities/core-concepts/jobs/schedule-a-job)) * [Workspaces](/cloud/platform-capabilities/core-concepts/workspaces) * [Apps](/cloud/platform-capabilities/features/apps) * [Launchers](/cloud/platform-capabilities/features/launchers) * [On-demand clusters](/cloud/platform-capabilities/features/compute-clusters-hpc) ## Limitations * Domino endpoints do not support External Data Volumes. * External Data Volume actions are not exposed by the Domino Platform API or Domino CLI. * Domino does not track snapshots or versions for EDV data. For reproducible data, use [Dataset snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots). * SMB is disabled by default. See [Set up Kubernetes PV and PVC](/cloud/admin/data-administration/external-data/external-data-volumes#set-up-the-kubernetes-pv-and-pvc) for more details. ## Next steps [Add EDVs to Projects.](/cloud/platform-capabilities/core-concepts/data/external-volumes/use-a-mounted-volume) # Add EDVs to Projects Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/external-volumes/use-a-mounted-volume Add shared EDVs to Projects, choose which volumes mount in executions, use their mount paths, and remove volumes without affecting other Projects. If a Domino admin has registered an external data volume (EDV) and shared it with you, you can add it to any of your projects. When you remove an EDV from a project, it remains mounted and available to other projects in Domino. [Remote data planes](/cloud/platform-capabilities/core-concepts/data-plane) are needed to use EDVs in Domino Cloud. ## Add an EDV to a Project 1. In your project, go to **Data** and click **External data volumes**. Navigate to External data volumes 2. Click **Add External Volume**. 3. Select an EDV from the list. 4. Click **Add**. If you cannot view, search for, or select External data volumes, they are not registered in your deployment or you do not have access privileges. Contact your Domino administrator for assistance. If your volume is successfully mounted, it is listed in your project at **Data** > **External data volumes**. The table indicates which [data planes](/cloud/platform-capabilities/core-concepts/workspaces/launch-a-workspace) have access to this EDV: List of the mounted external data volumes ## Remove an EDV from a Project 1. In your project, go to **Data** > **External data volumes**. 2. Click the three vertical dots at the end of the row for the volume in the table, then click **Remove**. Where to click to remove an external data volume ## Use an EDV in a Project By default, EDVs that are mounted to your project (and that you have access to) are also automatically mounted in supported executions. To access a volume in an execution, reference the mount path of the volumes. Choose to mount specific EDVs for your execution. The following example shows specific EDVs being selected in the Workspace startup modal. Selectable external data volumes Each EDV used by an execution must be successfully bound to the execution during startup. If any binding issues occur, the execution does not start. Additionally, each EDV may introduce latency to the startup process. To optimize startup time and avoid unnecessary startup failures, select only the necessary EDVs for your task. ### View all mounted volumes in a Project In your project, go to **Data** > **External data volumes**. Each volume’s properties are shown in the table. * **Name**: An alias for the volume, set by your Domino administrator. * **Type**: The type of volume. Domino supports NFS, AWS EFS, and Windows Share (SMB). * **Description**: A description of the volume, set by your Domino administrator. * **Mount Path**: The mount path of the volume: `/domino/edv/name-of-volume`. Use this mount path when using the volume in a [Job, Workspace, or other supported Domino execution](/cloud/platform-capabilities/core-concepts/data/external-volumes#edv-support-in-domino-executions). * **Data Plane**: In [Domino Nexus deployments](/cloud/admin/architecture-and-deployment/architecture/nexus-hybrid-architecture), the [data plane](/cloud/platform-capabilities/core-concepts/data-plane) where the volume is mounted. If a volume is greyed out, you do not have privileges to use it. Your project can also contain volumes that are mounted, but not listed. You see a message in the application for both these situations. If you need access to these volumes, contact your Domino administrator. ## Next steps * Learn about [EDV security and sharing](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-edv). # Data Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/index Where your data lives when you work in Domino, and how to choose between Data Source connectors, Domino Datasets, NetApp Volumes, and External Data Volumes. Domino separates your data from your code. Your code lives in Project files, which Domino versions on every change. Your data lives outside those files, so your commit history stays about code, and the same data can serve any Project that needs it. Domino gives you several ways to reach data, and the right one depends on where the data already lives and how you want to work with it. You don't have to move data into Domino to use it. You can query databases, warehouses, and object stores where they already run, mount existing NFS or SMB file shares, plug in enterprise NetApp storage, or store data inside Domino when you want managed, shareable storage with built-in snapshots backed by the platform. The Data section covers all of these methods, in the order they appear in the sidebar: * **[Domino Datasets](/cloud/platform-capabilities/core-concepts/data/datasets)**: Managed filesystem storage inside Domino, shareable across Projects and versioned with snapshots. Every Project starts with its own Dataset, named after the Project, which is the fastest way to write data alongside your code without polluting your Project's file history. * **[NetApp Volumes](/cloud/platform-capabilities/core-concepts/data/netapp-volumes)**: NetApp ONTAP enterprise storage mounted directly into Domino workloads. For organizations that run ONTAP, NetApp Volumes match what Datasets do and add enterprise-grade storage features. See [Datasets vs. NetApp Volumes](#datasets-vs-netapp-volumes) for how to choose. * **[External Data Volumes (EDVs)](/cloud/platform-capabilities/core-concepts/data/external-volumes)**: Existing Network File System (NFS) or Server Message Block (SMB) file shares that an administrator registers with Domino and mounts into your executions. * **[Access external data directly](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly)**: Reach any data service from your code using the same libraries you'd use locally, when Domino doesn't have a managed connector for it. * **[Data sharing and security](/cloud/platform-capabilities/core-concepts/data/sharing-and-security)**: How access control works for each method. * **[Domino Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors)**: Managed connections to popular external databases, warehouses, and object stores that you query from code, without hand-managing drivers or credentials. [Project artifacts](/cloud/platform-capabilities/core-concepts/projects/git-based-projects#save-and-pull-artifacts) round out the picture: a version-controlled folder inside each Project, sized for small outputs such as charts and serialized models, and the one place where "data" is intentionally tied to a single Project's history. ### Data across the platform Data connections in Domino are platform-level objects, not Project contents: the same Data Source, Dataset, NetApp Volume, or EDV can be [attached to every Project](/cloud/platform-capabilities/core-concepts/projects) that needs it, with its own permissions, and each Project's executions mount or query the attached data. Project artifacts are the exception that lives inside a Project. Connected data then serves the whole lifecycle, not just development. [Workspaces](/cloud/platform-capabilities/core-concepts/workspaces), [Jobs](/cloud/platform-capabilities/core-concepts/jobs), [Flows](/cloud/platform-capabilities/features/flows), and [on-demand compute clusters](/cloud/platform-capabilities/features/compute-clusters-hpc) read and write it during development and training. Published [Apps](/cloud/platform-capabilities/features/apps), [Agents](/cloud/platform-capabilities/features/agents), and [model APIs](/cloud/platform-capabilities/features/model-deployment) query it at serving time. [Model Monitoring](/cloud/platform-capabilities/features/monitoring) connects to your data sources on its own to compare live predictions against ground truth, and its drift and quality alerts drive retraining. [Governance](/cloud/platform-capabilities/features/governance) closes the accountability loop: Dataset files can serve as evidence in governance bundles, and Data Source activity is recorded in the [Audit Trail](/cloud/platform-capabilities/features/governance/audit-trail). ```mermaid placement="top-right" theme={null} flowchart LR ext[("Your external data:
databases, warehouses,
file shares")] subgraph domino ["The Domino platform"] subgraph shared ["Platform-level data, shared across Projects"] ds["Data Source
connectors"] edv["External Data Volumes"] nv["NetApp Volumes"] dsets[("Domino Datasets:
Domino-managed storage")] end proj["Projects:
attach the data they need
(artifacts live here)"] exec["Executions:
Workspaces, Jobs, Apps,
Agents, model APIs"] end ext --> ds ext --> edv ext --> nv ds --> proj edv -->|attached to| proj nv -->|attached to| proj dsets --> proj proj -->|mounted and queried by| exec ``` ## Choose a method Two defaults cover most work: * **Your data lives in an external store**: Use a Data Source connector. Your administrator can pre-configure the connection details centrally, so you add only your credentials: no guessing at hostnames or port numbers. Credentials are stored securely, and the connection is reusable in any Project. If Domino has no connector for your store, [connect directly](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly) with the same library you would use locally. * **You want managed storage inside Domino**: Use a Domino Dataset, or a NetApp Volume if your organization runs ONTAP. Both mount into executions as filesystem paths, both support snapshots for reproducibility, and both are shareable across Projects. See [Datasets vs. NetApp Volumes](#datasets-vs-netapp-volumes) below. The other methods fit specific situations: use an External Data Volume when IT already maintains an NFS or SMB file share you need, and Project artifacts for small outputs that belong with your code. ### Datasets vs. NetApp Volumes Datasets and NetApp Volumes cover the same ground. Anything Datasets do, NetApp Volumes generally do at least as well and often better, but they aren't strictly "Domino-managed" the way Datasets are: an administrator needs a NetApp ONTAP account configured and connected first. Once that's done, users work with NetApp Volumes the same way they work with Datasets, from the same **Data** menu. Use **Datasets** when: * You want storage that works out of the box, with no infrastructure prerequisites. * You are creating a data artifact scoped to a Project (Datasets originate inside a Project, though you can then share them anywhere). * You want to branch your data: you can create a new Dataset from a Dataset snapshot, where a NetApp Volume snapshot can't be cloned into a new NetApp Volume. Use **NetApp Volumes** when: * Your organization already runs, or is willing to set up, NetApp ONTAP. * You need multi-terabyte, high-performance shared storage with enterprise backup, snapshot retention, and disaster recovery. * You want snapshots that don't consume additional storage capacity and near-instant snapshot creation. * You want data to be a global entity in Domino rather than a Project-owned artifact. ## Compare the methods | Method | Best for | Where the data lives | Typical size | Access control | | - | - | - | - | - | | [Domino Datasets](/cloud/platform-capabilities/core-concepts/data/datasets) | Versioned training data and pipeline outputs, out of the box | Domino-managed storage | Gigabytes to a few terabytes | [Dataset roles](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets) | | [NetApp Volumes](/cloud/platform-capabilities/core-concepts/data/netapp-volumes) | Multi-terabyte shared storage with enterprise backup and efficient snapshots | Your NetApp ONTAP filesystems | Multi-terabyte and beyond | [NetApp Volume roles](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/create-netapp-volumes#add-users-or-organizations-to-netapp-volumes) | | [External Data Volumes](/cloud/platform-capabilities/core-concepts/data/external-volumes) | NFS or SMB file shares IT already maintains | Your NFS or SMB storage | Whatever your NFS or SMB storage provides | [Assigned users and groups](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-edv) | | [Data Source connectors](/cloud/platform-capabilities/core-concepts/data/data-source-connectors) | Querying existing databases, warehouses, and object stores | Your external data service | What you pull into the executor | [Users, groups, or a service account](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) | | [Project artifacts](/cloud/platform-capabilities/core-concepts/projects/git-based-projects#save-and-pull-artifacts) | Small outputs that belong with code | The Project's artifact storage | About 10 GB in total | [Project collaborators](/cloud/platform-capabilities/core-concepts/projects/collaborate-on-projects#collaborator-permissions) | ### Sizing and cost Domino sets no size limit on Datasets, NetApp Volumes, or External Data Volumes: the ceiling comes from whatever storage backs them, so check that provider's documentation for the figure that applies to you. For NetApp Volumes it depends on the ONTAP volume type, and a single traditional FlexVol supports up to 300 TiB. Project files, where artifacts live, are the exception, and Domino applies its own configurable limits there. See [Files, artifacts, and results](/cloud/platform-capabilities/core-concepts/projects/files-artifacts-and-results). What grows is cost, not a Domino quota. Storage cost tracks the bytes you keep, and every Dataset snapshot duplicates the data it captures, so delete what you no longer need. NetApp's redirect-on-write snapshots consume no extra space to start, which keeps the cost of versioning low. When cost matters more than filesystem access, keep bulk data in object storage such as Amazon S3 and reach it through a Data Source connector. Administrators can cap what any one person stores. See [Dataset quotas and limits](/cloud/platform-capabilities/core-concepts/data/datasets/manage-large-data#dataset-quotas-and-limits). ## Data reproducibility When your work must be repeatable, use snapshots: immutable, versioned copies of a Dataset or NetApp Volume that your code can target by version number or tag. Data Source connectors and EDVs read live data, so Domino can't guarantee that the same query returns the same result later. If the external system supports its own snapshots or time travel, you can use those features from your code, or copy query results into a Dataset or NetApp Volume and snapshot them. ## Share your data securely Data in Domino is reusable across Projects with full control over who can access it. Datasets, NetApp Volumes, Data Sources, and EDVs each carry their own permissions, so sharing a Project does not automatically expose its data. Dataset and NetApp Volume sharing is zero-copy: every Project mounts the same files rather than receiving a copy, so a read-only shared Dataset or NetApp Volume works as a controlled way to distribute a curated data product across teams. See [Data sharing and security](/cloud/platform-capabilities/core-concepts/data/sharing-and-security) for how to grant and restrict access for each method. ## Work with data * [Datasets](/cloud/platform-capabilities/core-concepts/data/datasets): Create, use, and snapshot Domino Datasets. * [NetApp Volumes](/cloud/platform-capabilities/core-concepts/data/netapp-volumes): Mount ONTAP volumes into Domino workloads. * [External Data Volumes](/cloud/platform-capabilities/core-concepts/data/external-volumes): Mount existing network file shares. * [Access external data directly](/cloud/platform-capabilities/core-concepts/data/access-external-data-directly): Reach any other data service with its native library. * [Data sharing and security](/cloud/platform-capabilities/core-concepts/data/sharing-and-security): Control who can read and edit your data. * [Domino Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors): Connect to supported databases, warehouses, and object stores. # Add or remove NetApp Volumes on Projects Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes Attach NetApp Volumes to Projects, Workspaces, and Jobs, choose read-only or read-write access, and detach or delete volumes safely. NetApp Volumes are global entities in Domino, similar to Datasets but not scoped to a single Project. You attach a NetApp Volume to any Project that needs it, and the Volume mounts into that Project's executions the same way a Dataset does. Multiple users on multiple Projects can work against the same NetApp Volume in parallel, which makes NetApp Volumes a good fit for shared team datasets and enterprise-scale storage. You'll need a role that allows you to see or work with a NetApp Volume to attach it to a Project. If you have the **Reader** role, you can still attach the NetApp Volume, but you can only view the data. ## Add a NetApp Volume to a Project 1. Close out any Projects and go to the main Domino screen. 2. From the toolbar, click **Data** > **NetApp Volumes**. 3. Find the volume you want to add in the NetApp Volumes list. 4. Click the three dots to the right and select **Add to project**. 5. Use the menu to search for and select the Project. 6. Click **Confirm**. If you want to add the same NetApp Volume to multiple Projects, repeat these steps. ## Remove a NetApp Volume from a Project Remove a NetApp Volume from a Project when the Volume has failed or you no longer need it there. Removing a Volume from a Project only detaches it: the Volume itself and its data are unaffected, and other Projects that use it keep working. 1. Open the **Project** with the NetApp Volume you want to remove. 2. From the left panel, click **Data** > **NetApp Volumes**. 3. Find the volume in the NetApp Volumes list. 4. Click the three dots to the right and select **Remove from project**. ## Delete a NetApp Volume Deleting a NetApp Volume permanently loses the data. Only delete a Volume when you're sure it's no longer needed anywhere. You can delete your own NetApp Volumes if your Domino administrator has enabled that ability for your role. If not, you can mark a NetApp Volume for deletion by submitting a deletion request to your Domino administrator. 1. From the toolbar, click **Data** > **NetApp Volumes**. 2. Find the volume in the NetApp Volumes list. 3. Click the three dots to the right and: 1. Select **Delete Volume**. 2. Or select **Mark for deletion**. 4. Read the confirmation message: 1. If you agree, click **Delete** or **Mark for deletion**. 2. To abort the action, click **Cancel**. ## Attach a NetApp Volume to a Workspace or Job Attaching a NetApp Volume to a Workspace, Job, App, or Launcher gives that execution direct access to its files. You select which NetApp Volumes to attach when you launch the execution: * Users with the **Volume Owner** or **Editor** role may attach the NetApp Volumes assigned to the Project to Workspaces or Jobs within that Project in **read-write** mode. * Users with the **Reader** role may attach the same NetApp Volumes in **read-only** mode. * Apps mount as **read-write** or **read-only** based on the permissions of the App owner. By default an attached NetApp Volume mounts with its live data and all of its snapshots. On the **Data Plane & Hardware** tab you can pin any mounted NetApp Volume to a single snapshot instead, the same way you can [pin a Dataset](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots#choose-which-datasets-and-snapshots-to-mount). ## Mount paths NetApp Volumes mount into executions at file paths that mirror the Dataset scheme. Because NetApp Volumes are global, there's no local vs. imported distinction: * **DFS Projects**: `/domino/netapp-volumes/` for the read-write NetApp Volume, `/domino/netapp-volumes/snapshots/` for its snapshots, and `/domino/netapp-volumes/snapshot-tags//` for a tagged one. * **Git-based Projects**: `/mnt/netapp-volumes/` for the read-write NetApp Volume, `/mnt/netapp-volumes/snapshots/` for its snapshots, and `/mnt/netapp-volumes/snapshot-tags//` for a tagged one. For the equivalent Dataset paths and the underlying directory layout, see [Understand Dataset paths](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots#understand-dataset-paths). For how tagged and numbered snapshots are mounted, see [Snapshot mounting in executions](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots#snapshot-mounting-in-executions). ## Next steps * [Create NetApp Volumes from Domino or a project](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/create-netapp-volumes) teaches you how to create and configure new NetApp Volumes from Domino or within a specific project. * [View or edit details of a NetApp Volume](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/view-and-edit-netapp-volumes) teaches you about viewing lists of NetApp Volumes, and editing the descriptions and permissions of them (only if you are the **Owner** or **Editor** of that NetApp Volume). # Create NetApp Volumes from Domino or a project Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/netapp-volumes/create-netapp-volumes Create NetApp Volumes globally or within a Project, set capacity and filesystem details, and assign Reader, Editor, or Owner roles. NetApp Volumes are created within an existing filesystem. You can create NetApp Volumes within a specific project or from globally accessible data. Create NetApp Volume ## Create a NetApp Volume from Domino When you create a new volume from Domino’s home page, you must manually [add the volume to a project](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes). 1. Open **Domino** to create a NetApp Volume. 2. From the toolbar, click **Data** > **NetApp Volumes**. 3. Click **Add NetApp Volume** > **Create Volume**. 4. Enter the following details in the **Create NetApp Volume** window: 1. **Name:** Enter a name for the volume. Names must contain only letters, numbers, underscores, and hyphens. 2. **Description:** Enter a brief description of the volume. 3. **Data Plane:** Choose a data plane from the menu. 4. **NetApp Filesystem:** Choose a filesystem from the menu. 5. **Capacity:** Specify the maximum capacity of the volume. 5. Click **Next**. 6. [Add users or organizations](#add-users-or-organizations-to-netapp-volumes) to your volume and assign their roles if needed. 7. Click **Finish**. ## Create a NetApp Volume from a project When you create a new volume within a project, it is automatically added to that project. 1. Open the **Project** where you want to create a NetApp Volume. 2. From the left panel, click **Data** > **NetApp Volumes**. 3. Click **Add NetApp Volume** > **Create Volume**. 4. Enter the following details in the **Create NetApp Volume** window: 1. **Name:** Enter a name for the volume. Names must contain only letters, numbers, underscores, and hyphens. 2. **Description:** Enter a brief description of the volume. 3. **Data Plane:** Choose a data plane from the menu. 4. **NetApp Filesystem:** Choose a filesystem from the menu. 5. **Capacity:** Specify the maximum capacity of the volume. 5. Click **Next**. 6. [Add users or organizations](#add-users-or-organizations-to-netapp-volumes) to your volume and assign their roles if needed. 7. Click **Finish**. ## Add users or organizations to NetApp Volumes There are different Roles preconfigured for use with your NetApp Volumes. If you are added to a volume and your assigned role is: * **Reader:** You can view files and snapshots, and manage NetApp Volumes in projects as read-only. * **Editor:** You can manage NetApp volumes by updating them, mounting them, marking them for deletion, or restoring them. You can also create and delete snapshots and manage users. * **Owner:** You have all the capabilities of an Editor and the ability to update Volume grants. Set User Roles for NetApp Volume To add users and set permissions for individuals or organizations, on the **Volume Permissions** screen: 1. Type a few characters to select a user or organization from the menu. 2. Select a **Role** for that user from the menu and click **Add**. 3. Repeat steps 1-2 to add as many users or organizations as needed. 4. Once you have added users, click **Finish**. ## Manage users on a NetApp Volume You can add, remove, or update the roles of users later if needed: 1. Open the **Project** with the NetApp Volume where you want to manage user roles. 2. From the left panel, click **Data** > **NetApp Volumes**. 3. Find the volume in the NetApp Volumes list. 4. Click the three dots to the right and select **Edit permissions**. 5. You can manage users by: 1. Removing users by clicking the delete icon. 2. Adding new users and assigning them roles. 3. Changing user roles as needed. 6. Once finished, click **Save permissions**. ## Next steps * [Add or remove NetApp Volumes from a project](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes) shows you how to use the different roles that are preconfigured for use with your NetApp Volumes. * [View or edit details of a NetApp Volume](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/view-and-edit-netapp-volumes) teaches you about viewing lists of NetApp Volumes, and editing the descriptions and permissions of them (only if you are the **Owner** or **Editor** of that NetApp Volume). * [Request deletion of a NetApp Volume](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes#delete-a-netapp-volume) shows you why and how to request that an admin deletes a NetApp Volume. # Work with NetApp Volumes Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/netapp-volumes/index Use NetApp Volumes for shared, large-scale ONTAP storage, take near-instant snapshots, and manage access, attachments, and deletion. Domino Volumes for NetApp ONTAP (NetApp Volumes) offer a native integration with NetApp’s enterprise-grade storage system. Mount storage from NetApp ONTAP filesystems directly into Domino workloads. NetApp Volumes cover nearly the same ground as [Domino Datasets](/cloud/platform-capabilities/core-concepts/data/datasets), and the Domino Data team recommends them wherever your organization runs ONTAP. Their [snapshots](https://docs.netapp.com/us-en/ontap/concepts/snapshot-copies-concept.html) are the main reason: * **Near-instant, regardless of size**: a snapshot of 100 GB or more completes in about 3 seconds, where a Dataset snapshot takes anywhere from seconds to hours as the data grows. * **No extra storage to start**: ONTAP uses redirect-on-write, so a snapshot initially consumes no extra space. A Dataset snapshot duplicates the data it captures at the moment you take it. Cloning is the one thing Datasets do that NetApp Volumes don't: you can create a new Dataset from a Dataset snapshot, but you can't clone a NetApp Volume snapshot into a new NetApp Volume. Domino Volumes for NetApp ONTAP. NetApp Volumes suit multi-terabyte and larger datasets that need high availability and enterprise backup and recovery. They are not as quick to start with as a Dataset: they require NetApp ONTAP infrastructure, and an administrator registers an ONTAP Filesystem in Domino first. Once that is done, you work with them from the same **Data** menu as Datasets. They aren't version-controlled by Domino, and there are limits on the number of snapshots per NetApp Volume and NetApp Volumes per filesystem. Domino sets no size limit on a NetApp Volume. The ceiling comes from ONTAP and depends on the volume type: a single traditional FlexVol supports up to 300 TiB. Check [NetApp's ONTAP documentation](https://docs.netapp.com/us-en/ontap/volumes/index.html) for the limits that apply to your filesystem. A NetApp ONTAP Filesystem connects a Data Plane and Kubernetes storage class to a named storage container for NetApp Volumes. The ONTAP Filesystem offers: * Clear visibility into where NetApp Volumes are stored. * Support for multiple accounts and Data Planes, which is essential given the per-account limits on NetApp Volume creation. * Improved deletion flow by allowing NetApp Volumes to be moved to cold storage, instead of being permanently deleted. This helps enforce retention policies and reduces the risk of accidental data loss. ## What you can do [Create NetApp Volumes](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/create-netapp-volumes)\ Create and configure new NetApp Volumes from Domino or the context of a specific project. * Set up the NetApp Volume name, description, and access roles. * Choose snapshot and synchronization options. [Manage NetApp Volume access in Projects](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes)\ Add or remove existing NetApp Volumes from any project: * Attach NetApp Volumes to enable data access within the project. * Detach NetApp Volumes when no longer needed or to restrict access. [Understand NetApp Volume roles](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/view-and-edit-netapp-volumes)\ Learn about the built-in role types and their permissions: * **Owner**: Full control. Reads and writes data, edits the description, takes and permanently deletes snapshots, changes who has access and their role, and requests deletion of the volume. * **Editor**: Reads and writes data on the volume, edits the description, and takes or permanently deletes snapshots. An Editor cannot change who has access to the volume or change other users' roles; only an Owner can do that. * **Reader**: Reads data on the volume and views its snapshots. Cannot write data, edit the description, or manage access. A Reader can only mark a snapshot for deletion, not delete it outright. [Version data with Snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots)\ Domino lets you create snapshots of both NetApp Volumes and Domino Datasets to support reproducibility, version control, and collaboration. [View and edit NetApp Volume details](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/view-and-edit-netapp-volumes)\ Access your list of NetApp Volumes where you have permissions: * View NetApp Volume metadata and configuration. * Edit description and permissions (Owner or Editor only). [Request NetApp Volume deletion](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes#delete-a-netapp-volume)\ If a NetApp Volume is no longer needed: * Delete the NetApp Volume or submit a deletion request to your Domino administrator. * Ensure the NetApp Volume is no longer attached to active projects or in use by users. # View and edit NetApp Volumes Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/netapp-volumes/view-and-edit-netapp-volumes View NetApp Volume metadata, Projects, snapshots, and mount paths, then rename volumes, edit descriptions, and manage or delete snapshots. You can view a list of NetApp Volumes where you have **Owner**, **Editor**, or **Reader** roles. You can edit the description and permissions if you are the **Owner** or **Editor** of a NetApp Volume. ## View a list of usable NetApp Volumes The **Data** menu in Domino lets you view a list of NetApp Volumes that are usable for your workspace. 1. Close any projects and go to the main Domino screen. 2. From the toolbar, click **Data** > **NetApp Volumes**. 3. You’ll see a screen with a list of available NetApp Volumes. The information shown in this list view for each NetApp Volume includes its **Name**, **Owner**, and **Size**, as well as: * **Projects**: Displays a list of projects that the NetApp Volume is associated with. * **Snapshots**: This shows the number of snapshots taken of the NetApp Volume. Clicking on a number shows a list of these snapshots. * **Data Plane**: This refers to the data plane to which the NetApp Volume is connected. You can also view more granular details for individual NetApp Volumes. ## View details of a NetApp Volume Here is how you view the details of NetApp Volumes from a project: 1. Open the **Project** with the NetApp Volume you want to view. 2. From the left panel, click **Data** > **NetApp Volumes**. 3. Find the volume in the NetApp Volumes list and click it. The details page shows the volume name with a snapshot selector next to it, a **Files** tab that lists the volume's files, and a details sidebar. On the **Files** tab, you can search the file list, choose which columns to show, upload files, and download or delete selected files from the **Actions** menu. The sidebar includes: * **Description**: A brief description of the NetApp Volume’s contents or purpose. If you have the **Editor** or **Owner** role, you can edit the volume description. * **Data Plane**: This refers to the data plane to which the NetApp Volume is connected. * **Storage name**: The name of the storage file system that backs the NetApp Volume. * **Storage path**: The location that the data is written to and read from. * **Max snapshots**: The maximum number of snapshots the volume can keep. * **Tags** and **Properties**: The [tags and Property values](/cloud/platform-capabilities/core-concepts/knowledge-management) assigned to the volume. ## Edit details of a NetApp Volume You can rename the volume, edit the description, and change permissions. Changing the volume name alters its mount path, which can cause errors in scripts that rely on a specific volume name. If you are the **Owner** or **Editor** of a NetApp Volume, edit details by: 1. From the toolbar, click **Data** > **NetApp Volumes**. 2. Find the volume in the NetApp Volumes list. 3. Click the name of the volume you want to edit. 4. In the details sidebar, click the **Description** edit icon, update the text, and save your change. 5. Rename the NetApp Volume by clicking the three dots and choosing **Rename Volume**. 1. Click **Confirm** to accept the change or **Cancel** to exit. 6. Change permissions by clicking **Share** at the top of the details page. ## Take a snapshot of your data You can snapshot your data without incurring duplication. To do so, you’ll need either **Owner** or **Editor** permissions to snapshot all files in a NetApp Volume. 1. From the toolbar, click **Data** > **NetApp Volumes**. 2. Find the volume in the NetApp Volumes list. 3. Click the name of the volume you want to snapshot. 4. On the **Files** tab, click **Take Snapshot**. The button is unavailable when the volume has reached its maximum number of snapshots. 5. Expand the snapshot selector next to the volume name, labeled **Latest data** by default, to view a list of snapshots for that volume. ## Delete a snapshot of a NetApp Volume Deleting a snapshot is *permanent*. You need permission to delete the NetApp Volume to delete its snapshots; without it, the **Delete Snapshot** button is unavailable. 1. From the toolbar, click **Data** > **NetApp Volumes**. 2. Find the volume in the NetApp Volumes list. 3. Click the name of the volume you want to view. 4. In the snapshot selector next to the volume name, select the snapshot you want to delete. Domino shows a read-only view of the snapshot. 5. On the **Files** tab, click **Delete Snapshot**. 6. At the prompt, choose **Delete** to delete the snapshot or **Cancel** to exit. ## Next steps * [Create NetApp Volumes from Domino or a project](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/create-netapp-volumes) teaches you how to create and configure new NetApp Volumes from Domino or within a specific project. * [Add or remove NetApp Volumes from a project](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes) shows you how to use the different roles that are preconfigured for use with your NetApp Volumes. * [Request deletion of a NetApp Volume](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/add-remove-netapp-volumes#delete-a-netapp-volume) shows you why and how to request that an admin deletes a NetApp Volume. # Share data securely Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/sharing-and-security/index Compare access controls for Domino Datasets, NetApp Volumes, Data Sources, and EDVs, then choose roles, credentials, and visibility. Data in Domino is reusable across Projects, and each data method carries its own permissions: sharing a Project does not automatically expose its data. The four data methods use related but distinct access models: * **Datasets** use [Dataset roles](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets): the Dataset owner grants roles (Reader, Editor, Owner) to users and organizations, and the role decides who can view, edit, or manage the Dataset. Datasets originate inside a Project but can then be shared with any Project or user in Domino. * **NetApp Volumes** use [role-based permissions similar to Datasets](/cloud/platform-capabilities/core-concepts/data/netapp-volumes/create-netapp-volumes#add-users-or-organizations-to-netapp-volumes): the Volume owner grants Reader, Editor, or Owner roles to users and organizations. NetApp Volumes differ from Datasets in that they are global from the start (they aren't scoped to a single "home" Project), so their permissions travel with the Volume, not with any one Project. * **Data Sources** use [credentials and visibility](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources): access depends on how the Data Source authenticates (individual credentials or a shared service account) and whether it's shared with everyone or with specific users and organizations. * **External Data Volumes (EDVs)** are [administrator-controlled](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-edv): an administrator decides which users and groups can access each volume. # Share Data Sources securely Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources Configure service account or individual credentials for Data Sources, control sharing, and understand Data API and direct-connection security. Domino data sources use Domino connectors to connect to external data stores. Data source permissions determine who is authorized to access a data source. Depending on their permissions and credentials, users can modify data in the external data store from Domino. By understanding how data source credentials and sharing work, you can ensure that your collaborators have the appropriate kind of access to your data sources. ## Configure Data Source credentials There are two methods of initializing credentials when creating a Domino Data Source: service account, and individual credentials. These two methods are defined below: * Service account With this approach, anyone with permissions to access the Domino Data Source uses the same credentials (those of the service account). Only a Domino admin can create a data source that uses a service account, at **Admin** > **Data** > **Data Sources** > **Create a Data Source**. If the service account has write access to the data store, then anyone with access to the data source can modify data in the external data store from Domino. Make sure the service account has permissions that are appropriate for all of its Domino users. * Individual credentials Each user who accesses the data source must set up their own credentials. Once their credentials are set up in Domino, they do not need to re-enter them when accessing the data source. If a user’s individual credentials give them write access to the data store, then they can modify data in the external data store from Domino. ## Share a Data Source The Data Source owner or a Domino admin can grant access to the Data Source for specific users or organizations. Admin can also make it available to everyone in the Domino deployment. When multiple users collaborate on a project, a data source used by one user might not be properly configured for another. Domino proactively surfaces such problems both from the project’s Data page as well as from the Data tab in Domino Workspaces. ### Change a Data Source’s permissions To edit the share permissions for a data source, go to **Data** > **Data Sources**, select your data source, and click **Update Permissions**. * To limit access to this data source, select **Specific users or organizations** and add or remove users or organizations as appropriate. * Admin can select **Everyone** to share this data source with all users in the deployment. Note that you cannot change the credential method (service account or individual credentials) for an existing data source. To change the credential method, you must create a new data source. If you do this, consider deleting the old data source and notifying users that they should use the new one. ## Data API authentication and authorization The [Domino Data API](/cloud/reference/api/data_api) is used to access Domino data sources. When you use the Data API from a Domino execution, your user identity is verified automatically to enforce Domino permissions. The library attempts to use a [Domino JWT token](/cloud/reference/api/domino-api-authentication), or, if not available, a [user API key](/cloud/reference/api/domino-api-authentication). The following is a summary of the user identity that is used for access to a data source based on the Domino execution type: * **Workspaces and Jobs**: The user who started the execution. * **Launchers**: The user who started the launcher regardless of who created the launcher. * **Domino Apps**: The user who published the app regardless of who is accessing the app. * **Domino endpoint** - No user identity. For Domino endpoints and other advanced use cases that require establishing a different user identity, you inject an API key into an execution with an environment variable. Then, you can use it explicitly when retrieving a data source. For detailed information, see [Authentication](/cloud/reference/api/data_api/authentication) in the API documentation. ## Security for direct connections to external data stores When directly accessing an external data store, it is up to you to configure the appropriate authentication and access control. In cases of directly accessing common AWS data stores (such as S3, Redshift, or Postgres) within an AWS deployment, Domino can propagate an IAM token down through your query. ## Next steps * [Create data sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors) * [Work with data sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources) # Share Datasets securely Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-datasets Share Domino Datasets with users or organizations, assign Owner, Editor, or Reader roles, and curate large Project data for consumers. Dataset owners can grant access to Domino users and groups. Only authorized users can import and access a dataset. Additionally, the actions that a user can perform on a dataset are determined by their Domino role. ## Set permissions to share a Dataset You can change the permissions on a dataset to do the following: * Add users or organizations. * Update roles for existing users or organizations. * Delete users or organizations. ### Change who can access a Dataset 1. In the navigation pane, click **Data**. 2. Click **Domino Datasets**. 3. In the **Your Domino Datasets** area, go to the end of the row for the dataset whose permissions you want to change. 4. Click the three vertical dots and click **Edit Permissions**. 5. Enter the users or organizations to give them permission to the dataset. If you want to give all project members access to the dataset, click the **Add all project members** link. 6. Specify the user or organization’s role. Dataset roles are independent of Domino’s global user roles; see below for details about dataset roles. 7. Click **Add**. In the **Current Permissions** area, you can modify the role as needed, or click the trash icon to delete permissions. 8. Click **Save Permissions**. You must restart executions to pick up permission changes. ## Dataset roles Datasets have three roles: Owner, Editor, and Reader. These are independent of Domino’s global [user roles](/cloud/admin/identity-and-access/manage-users/roles). Roles determine the permissions that users have when they work with a dataset. The table below describes the roles and access. The **Relates to Project Role** column is only useful if you are migrating from versions of Domino earlier than 5.4 where datasets were integrated with projects.
Role Relates to Project Role Description

Owner

Dataset Author

  • Upload and view files, update metadata.

  • Take, update, and view snapshots.

  • Mark datasets and snapshots for deletion.

  • Restore datasets and snapshots for deletion.

  • Copy a snapshot to a new dataset.

  • Download files and folders.

  • Mount a dataset as read-write to executions.

  • Edit the dataset’s permissions.

Editor

Project Owner, Project Contributor

  • Upload and view files, update metadata.

  • Take, update, and view snapshots.

  • Mark datasets and snapshots for deletion.

  • Restore datasets and snapshots for deletion.

  • Copy a snapshot to a new dataset.

  • Download files and folders.

  • Mount a dataset as read-write to executions.

Reader

ResultsConsumer, ProjectImporter, LauncherUser

  • View files.

  • View snapshots.

  • Copy a snapshot to a new dataset.

  • Download files and folders.

  • Mount a dataset as read-only to executions.

## Shareable data in your Project If you [export and import project content](/cloud/platform-capabilities/core-concepts/projects/manage-projects#export-and-import-project-content) to share data with other members of your team, the consumers of your project will receive the entire contents of your project files in their Runs and Workspaces. That works well if your project is small, simple, and narrowly scoped. However, for large projects that produce many data artifacts, you might want to expose them to your consumers in smaller, curated subsets. You can do this with Domino datasets. Consider a project with a small folder full of code and nine folders with various kinds of output data, labeled `experiment1` through `experiment9`. Each data folder is larger than 10 GB, and the whole project is 100 GB. It would be impractical to ask your data consumers to import this project, but you also don’t want to separate the data from the code that produced it by moving the data to a different project. You can organize the data into datasets, with one dataset for each type of data in which your consumers are interested. In this example, suppose you have two colleagues who want to consume your data. One of them is only interested in the data from the `experiment1` folder, and the other is only interested in the data from `experiment9`. You can [create](/cloud/platform-capabilities/core-concepts/data/datasets/create-and-manage-datasets) and write two datasets with scripts like the following, where it’s assumed you have named the datasets `experiment1-data` and `experiment9-data`. `experiment1-populate-dataset.sh` ```shell theme={null} cp -R $DOMINO_WORKING_DIR/experiment1/. /domino/datasets/experiment1-data/ ``` `experiment9-populate-dataset.sh` ```shell theme={null} cp -R $DOMINO_WORKING_DIR/experiment9/. /domino/datasets/experiment9-data/ ``` Your consumers can then [mount](/cloud/platform-capabilities/core-concepts/data/datasets/use-datasets-and-snapshots) only the datasets in which they are interested. If you are working with data at this scale, write it to datasets whenever you produce it, instead of storing it in your project files. ## Next steps * [Create datasets](/cloud/platform-capabilities/core-concepts/data/datasets/create-and-manage-datasets) * [Work with datasets](/cloud/platform-capabilities/core-concepts/data/datasets) # Share EDVs securely Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-edv Control EDV access with read-only mounts and Volume Access settings, and verify which administrator-managed volumes you can add to a Project. This topic explains how security and sharing with external data volumes (EDVs). EDVs can only be defined by Domino admins. Users can mount EDVs in their projects. Domino does not propagate the user’s identity down into the underlying network-attached file system. ## EDV security settings When an admin defines an EDV in Domino, they can specify two important security settings: * **Mount as read-only** Selecting this option means that users cannot modify the data in the EDV through Domino. This is the recommended setting in most cases. * **Volume Access** This setting specifies which Domino users or groups are allowed to access the EDV. This can be everyone in the Domino deployment, or only specific users and organizations. ## Share or get access to an EDV Only an admin can modify the **Volume Access** setting for an EDV. If an EDV is not available to all of the users who need to access it, contact your Domino admin. To see whether an EDV is available to you, go to **Data** > **External Data Volumes** > **Add External Volume** in your project and check whether the EDV you need is listed. ## Next steps * Learn more about [EDV support in Domino executions](/cloud/platform-capabilities/core-concepts/data/external-volumes#edv-support-in-domino-executions). * [Work with EDVs](/cloud/platform-capabilities/core-concepts/data/external-volumes) in your projects. # Create and run Jobs Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/jobs/create-and-run-jobs Launch and configure Domino Jobs through the UI, CLI, Python SDK, or API, then tag, rename, stop, schedule, and re-run them. Learn about the many flexible ways that you can launch Domino Jobs depending on your needs. Domino [Jobs](/cloud/platform-capabilities/core-concepts/jobs) provide a structured approach to run [code files](/cloud/platform-capabilities/core-concepts/jobs/create-custom-jobs) organizing the necessary hardware, compute environment, data resources, and security protocols to create a highly reproducible execution environment. ## Run a Job in the UI You can start a Job interactively from multiple locations in the Domino UI. ### Jobs Dashboard in a Project To run a Job from the Job dashboard in your Project: 1. In your project, navigate to the **Jobs** section. The Jobs dashboard shows all Jobs for your Project, sorted into tabs by Job status. You can also use the Quick Action menu to create a Job. To do this, click the + next to Jobs in the navigation pane. 2. Click **Run** to start a new Job. 3. In the Start Run window, configure the Job. 4. Enter the **Command or File Name** of the script you want Domino to execute, followed by any arguments for the script. By default, all non-zero exit codes are reported as Domino Job failures. If you’d prefer to change this behavior, the best approach is by mapping your code’s exit status to a conventional exit code. In most environments (environments that run POSIX-compliant shells), this can be done using the snippet below. It uses the command exit 2 as an example to exit with a non-conventional exit status that should be treated as success: ```bash theme={null} bash -c 'exit 2 || [ %? -eq 2 ]' ``` 5. Choose the [Compute Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments) for the Job and its specific version. By default, the Job uses the latest version of your environment. Domino recommends that you use the revision that was set as active by the Project owner. If you select another revision, you can see a **Not Recommended** warning. [Restricted Projects](/cloud/admin/platform-configuration/manage-compute-environments/restricted-environments) may limit your choice of environments. 6. If your administrator has enabled [volume provisioning recommendations](/cloud/admin/infrastructure-and-compute/manage-compute-resources/manage-persistent-volumes#enable-volume-provisioning-recommendations), you can select a volume size automatically recommended by Domino, instead of the default volume size. In a [Git-based Project](/cloud/platform-capabilities/core-concepts/projects/git-based-projects), the first Job you launch always uses the volume size [configured in your Project settings](/cloud/platform-capabilities/core-concepts/workspaces/launch-a-workspace#select-a-volume-size). Subsequent Job launches receive volume provisioning recommendations. 7. Click **Next** and select the [Hardware Tier](/cloud/admin/infrastructure-and-compute/manage-compute-resources/hardware-tiers) to use for this Job. In a [Domino Nexus deployment](/cloud/admin/architecture-and-deployment/architecture/nexus-hybrid-architecture), hardware tiers in the dropdown are grouped by [data plane](/cloud/platform-capabilities/core-concepts/data-plane), such as `GCP` below. The `Local` data plane corresponds to running the execution in the Domino control plane cluster. Launch a Job and select a hardware tier 8. If necessary, attach a compute cluster to your execution. To learn more about clusters, see the following: * [Spark on Domino](/cloud/platform-capabilities/features/compute-clusters-hpc/spark/index) * [On-demand Ray](/cloud/platform-capabilities/features/compute-clusters-hpc/ray/index) * [On-demand Dask](/cloud/platform-capabilities/features/compute-clusters-hpc/dask/index) * [On-demand Open MPI](/cloud/platform-capabilities/features/compute-clusters-hpc/mpi/index) 9. Domino shows you what data is mounted in your execution based on the selected data plane. Each mounted NetApp Volume or Dataset has a **Snapshot** column where you can pin it to a single snapshot for this run. [Choose a snapshot per asset at launch](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots#choose-a-snapshot-per-asset-at-launch) covers the options. If you want to use a data mount that is not available, note which data planes it is available in, then return to the first step in the modal to select a hardware tier in the corresponding data plane. 10. You can also configure your Job to create [Dataset Snapshots](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots) to mount upon execution completion. Created snapshots are shown under the details tab for a Job. Data in selected data plane This feature requires `AllowDatasetSnapshotsOnExecutionCompletion` to be enabled. See the [create a snapshot](/cloud/platform-capabilities/core-concepts/data/datasets/version-data-with-snapshots) guide for more details. ### Project files page You can start a Job directly from the Project **Code** page. 1. Go to your Project > **Code** > Find the file you want to run. 2. Click the gear icon > **Run**. 3. Go to the file you want to run and click the gear icon at the end of the row in the files list, then click **Run**. 4. Use the window to configure the Run. This window has additional options to set up recurring scheduled Jobs and select different hardware tiers. **Title**\ In this field, enter a name for the Job. This name is the label for the Job in the Jobs dashboard. **Parameters**\ If there are any arguments or parameters you’d like to pass to your script, enter them here. **Hardware tier**\ This dropdown list lets you set the hardware tier used by the Job. **Schedule to repeat**\ In this section, specify if you want the run to execute only once, or to repeat on a schedule. **Publish after complete**\ Check this if you want Domino to republish a [Domino endpoint](/cloud/platform-capabilities/features/model-deployment) once the Job completes successfully. ### Launcher UI A [Launcher](/cloud/platform-capabilities/features/launchers) is a web form that rests on top of a script that Domino can execute in a Job. You can use a Launcher to pass arguments to your script from UI fields in a customized web form. ## Run a Job from the CLI From your workstation, you can start Jobs through the [Domino CLI](/cloud/reference/cli). You must first [install the Domino CLI](/cloud/reference/cli/install-the-cli) on your system. After you have logged in and opened a Project, you can start Jobs with: ```bash theme={null} `domino run ` ``` Examples: ```bash theme={null} `domino run calculateStats.r` `domino run runModel.m model1 .05` `domino run --wait runModel.m model1 .05` `domino run --direct "pip freeze | grep pandas"` ``` ### Domino Python SDK You can use the [Domino Python SDK](/cloud/reference/python-sdk/python-domino) to start and monitor Jobs in Domino either from a tool like a Jupyter Notebook or VS Code or from within another Domino Job to chain together multiple Jobs in a more complex workflow. 1. Write code to connect to Domino and start a Run using the following example: ```python theme={null} import os from domino import Domino domino = Domino( "marks/quick-start", api_key = os.environ["DOMINO_USER_API_KEY"], host = os.environ["DOMINO_API_HOST"], ) # Blocking: this will start the run and wait for the run to finish before returning the status of the run domino_run = domino.runs_start_blocking( ["main.py", "a", "b", "9"], title = "Started from Python API example code" ) print(domino_run) # Non-blocking: this will start the run and print the Run ID and check the status of the run *once* # domino_run = domino.runs_start(["main.py", "a", "b", "9"], # title = "Started from Python API example code") # print(domino_run) # run_status = domino.runs_status(domino_run.get("runId")) # print(run_status) ``` When using the Python SDK from within a Domino Workspace or Job, the environment variables needed for authentication are automatically configured. If you would like to set up your workstation outside Domino, learn more about how to [programmatically access Domino](/cloud/reference/api/domino-api-authentication) ## Run a Job from the Domino API You can use the Domino API to start a Job with a POST request. For more information about how to send valid configuration data, see [`startJob` in the Domino Platform API reference](/api-reference/jobs/start-a-job). The `commitId` field pins a commit in the Project's internal Domino File System (DFS) history, never a commit on the main Git repository. In a [Git-based Project](/cloud/platform-capabilities/core-concepts/projects/git-based-projects), the DFS still stores artifacts, so `startJob` accepts a `commitId` that exists in the Project's DFS history and rejects any other value with HTTP 400. To pin the main repository to a specific commit, pass `mainRepoGitRef` with `refType: "commitId"` and the SHA in `value`. To list Jobs for a Project from the API, see [List Jobs programmatically](/cloud/platform-capabilities/core-concepts/jobs/monitor-jobs#list-jobs-programmatically) on the Monitor Jobs page. ### Resolve Job defaults before you start a Job Call `POST /api/jobs/v1/projects/{projectId}/job-defaults` to see the exact configuration a Job in a Project would run with, without starting anything. Use it to show or record a Job's effective configuration, or to fill in a `startJob` request from the Project's defaults. Every field in the request body is optional. Each field you send is applied as an override, and Domino resolves everything you leave out from the Project's defaults. Send an empty object to resolve every value from the Project. Resolution is read-only and leaves no trace on the Project, and it requires only the `ViewJobs` permission. The response reports the fully resolved hardware tier, environment and revision, Git ref, Dataset and NetApp Volume snapshots, external volumes, and volume size. Seven fields use the same names as the `startJob` request body, so you can copy each resolved value straight into `POST /api/jobs/v1/jobs`: `hardwareTier`, `environmentId`, `environmentRevisionSpec`, `mainRepoGitRef`, `computeCluster`, `externalVolumeMountIds`, and `netAppVolumeIds`. The `commitId` field shares its name too, but carries over only for Projects that store files in DFS (see the note above). The remaining fields (`datasetSnapshots`, `netAppVolumeSnapshots`, `volumeSizeGiB`, `resolvedMainRepoGitRef`, and `resolvedImportedGitRepoRefs`) are reported for inspection and have no counterpart on the `startJob` request, so copy individual fields rather than the whole object. ### Python and R Domino API bindings The Domino API is also available in language-specific wrappers. Use the [dominodatalab Python library](/cloud/reference/python-sdk/python-wrapper-for-domino-api) and [domino R package](/cloud/reference/r-package/domino-r-package) to call the Domino API in your preferred language. ## Schedule a Job Use Domino to [schedule Jobs](/cloud/platform-capabilities/core-concepts/jobs/schedule-a-job) in advance, and set them to execute on a regular schedule. These can be useful when you have a data source that is updated regularly. ## Organize and manage Jobs Data science is an experimental science - it is common for a Project to require many Jobs before you’ve achieved your goals. Domino allows you to tag and rename Jobs to help you and your team track and manage Project work history effectively. ### Tag Jobs Tagged Jobs facilitates better search and discoverability in the [Jobs dashboard](/cloud/platform-capabilities/core-concepts/jobs/monitor-jobs). It’s best practice to start tagging Jobs from the start of a Project. For your tagging strategy, think about groups of Jobs you and collaborators would like to view in the Jobs dashboard. For example, tagging your LLM pre-training Jobs differently than the instruction fine-tuning Jobs might provide for better search and visualization. 1. From the navigation pane, click **Jobs**. 2. Select the Jobs you want to tag, then click the Tag icon. ### Rename Jobs Rename Jobs to clarify their purpose or highlight the importance of a particular Job. 1. From the navigation pane, click **Jobs**. 2. Click the **Edit** button next to the Job name. ### Stop a Job 1. From the navigation pane, click **Jobs**. 2. Go to the **Active** tab. 3. Select the checkboxes for the Jobs to stop and click the Stop icon. ### Re-run a Job To re-run a Job: 1. From the **Jobs** page, mark the check box of the Run that you want. 2. Select either **Re-Run with Original Version** or **Re-Run with the Current Version**. Original and Current are referencing all inputs to the Job *except* the command input argument string. See the table below that outlines the behavior of the two re-run modes in both Git-based projects (GBP) and Domino File System (DFS) projects. #### Git-based Projects | | Command input arguments | Code in primary Git repository | Compute environment | Artifacts in DFS | Imported Git repositories | | - | - | - | - | - | - | | Re-Run with Original Version | Original | Original | Original | Original | Original | | Re-Run with Current Version | Original | Current | Current | Current | Current | #### Domino File System Projects | | Command input arguments | Compute environment | Files in DFS | Imported Git repositories | | - | - | - | - | - | | Re-Run with Original Version | Original | Original | Original | Original | | Re-Run with Current Version | Original | Current | Current | Current | * When working in a GBP project, re-running a Job using **Re-Run with Current Version** only works as expected on an *original Job*. If you re-run a Job that was itself a re-run, the platform does not fetch the latest commit from the branch. It simply uses the commit ID from the re-run Job itself. This is because re-runs are tied to a specific commit, not the branch state. * In both DFS and GBP projects, the **Re-Run with Current Version** button only fetches the latest Git commits for your main or imported repositories if the original Job was run from a branch (like the default or any named branch). If the Job was originally run from a specific commit or tag, the re-run does not pull the latest Git commit. * In [restricted Projects](/cloud/admin/platform-configuration/manage-compute-environments/restricted-environments), Job re-runs use the current restricted revision of the environment. This revision may be different from the revision that was used to run the Job previously. ## Next steps Learn how to [schedule Jobs](/cloud/platform-capabilities/core-concepts/jobs/schedule-a-job) and [view Job results](/cloud/platform-capabilities/core-concepts/jobs/monitor-jobs). # Create custom Job types Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/jobs/create-custom-jobs Review native Job file handlers and invocation commands, then add custom handlers to Compute Environments through Dockerfile instructions. Learn about Domino’s natively supported [Job](/cloud/platform-capabilities/core-concepts/jobs) types and languages, as well as how to create custom Job types to support your specific needs. Domino has native support for running a wide variety of different types of Jobs, both in a single container and using on-demand, auto-scaling clusters. Additionally, Domino lets you customize the type of programming languages and applications that can be used in Domino Jobs to achieve nearly any type of computational workload. This flexibility lets you do things like large-scale data preparation, distributed GPU deep learning model training, and more. ## Natively supported Job types The following lists the supported file types and the commands that Domino executes when it runs the file type: | Language | Filetype/Keyword | Invocation | | - | - | - | | Python | `py` | `python -u` | | R | `r` | `R --no-save --no-environ --no-site-file --no-restore --max-ppsize=100000` | | Markdown | `rmd`/`rhtml` | `R -e require('knitr'); knit('file_name')` | | Bash | `sh` | `bash file_name` | | Matlab | `m`/`mlx`/`mexa64` | `matlab –sd $(dirname file_name) -batch` | | Perl | `pl` | `perl file_name` | | Julia | `jl` | `julia file_name` | | Python notebook | `ipynb` | `ipython nbconvert -to notebook --execute file_name --output file_name` | | SAS | `sas` | `sas file_name -stdio` | | Stata | `do` | `stata -b do` | ## Custom Job types Domino supports executing nearly any type of user application code to achieve a wide variety of computational scenarios by [editing an Environment definition](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) to support your needs. This feature is disabled by default. To use this feature, please reach out to Domino Support. ### What is a file handler? When you run a Job, Domino automatically handles the execution of the file. For natively supported file types, Domino already has commands it runs based on the file extension. To execute a file extension that isn’t natively supported, or to run a different command for a file extension that is in the list, you can use a file handler. A file handler is a bash script with the name of the file extension (without the `.sh` extension), located in `/opt/domino/handlers/{extension}`. ### File handler examples The file handler lives in the Environment’s file system, so the execution of the Job depends on the Environment in which you run the Job. * The file handler `/opt/domino/handlers/jpeg` targets files with the `.jpeg` extension. * The file handler `/opt/domino/handlers/py` overrides the default behavior for `.py` files. Always include instructions to install the necessary software and dependencies to execute the file type. For example, if you create a file handler to add support for Node.js, include a line to install `nodejs`: ```shell theme={null} RUN apt-get -y install nodejs ``` ### Add a file handler through the Domino UI To add a file handler through the Domino UI, [edit an Environment definition](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition). 1. Click **Environments** in the Domino sidebar. 2. In the **Dockerfile instructions** field, create a directory for the custom file handler: ```shell theme={null} RUN mkdir -p /opt/domino/bin/file-handlers ``` 3. Add the commands you want to execute when you invoke the file. Save the custom commands to a file with the same name as the file extension you want to target: ```shell theme={null} RUN echo "#!/bin/bash" >> /opt/domino/bin/file-handlers/ RUN echo "" >> /opt/domino/bin/file-handlers/ RUN echo "" >> /opt/domino/bin/file-handlers/ ... ``` ### Add a file handler through the terminal To add a file handler through the terminal, you must build a Docker image and upload it to an external repository. You can use the Docker image to [create an Environment](/cloud/admin/platform-configuration/manage-compute-environments/create-envs-from-external-custom-images) that contains your file handler. 1. Create a directory for the custom file handler: ```shell theme={null} mkdir -p /opt/domino/bin/file-handlers ``` 2. Add the commands you want to execute when you invoke the file. Save the custom commands to a file with the same name as the file extension you want to target: ```shell theme={null} RUN echo "#!/bin/bash" >> /opt/domino/bin/file-handlers/ RUN echo "" >> /opt/domino/bin/file-handlers/ RUN echo "" >> /opt/domino/bin/file-handlers/ ... ``` 3. Save a copy of this file to a Docker image: ```shell theme={null} FROM {DOCKER_BASE_IMAGE} RUN mkdir -p /opt/domino/bin/file-handlers COPY /opt/domino/bin/file-handlers/ ``` 4. Build the Docker image and upload it to an external repository associated with your Project. ```shell theme={null} docker build -t "repository/domino-env-with-executable-target" . docker push "repository/domino-env-with-executable-target" ``` ### Share a custom file handler When you add custom file handlers to an Environment, the file handlers are associated with that Environment’s Docker image. Each Environment has its own Docker image. You can only have one Docker image per Environment. If you must use your custom file handler in another Environment, you have several alternatives: 1. If the file handler is in the Dockerfile instructions field, you can copy and paste the handler’s commands into the same field in a different Environment. 2. If the file handler is in a Docker image in an [external repository](/cloud/admin/platform-configuration/manage-compute-environments/create-envs-from-external-custom-images): 1. Use the Docker image as a base to build Docker images for any Environment that needs your custom file handler. 2. Upload the file handler itself to an external repository. You can reference this file from multiple Docker images. ## Next step Learn about all the ways you can [launch a Job](/cloud/platform-capabilities/core-concepts/jobs/create-and-run-jobs). # Customize Job result views Source: https://docs.domino.ai/cloud/platform-capabilities/core-concepts/jobs/customize-job-results Add custom Job metrics with dominostats.json, filter result files with .dominoresults or .dominoignore, and configure result emails. Domino offers a solution for capturing and visualizing Job metrics. While it’s recommended to use Domino’s MLflow implementation for this purpose, using Domino directly remains a popular choice. Users have the flexibility to log metrics in both places if they prefer. 1. Click **Jobs** from the Project menu. 2. Click the funnel icon above the table of Jobs to customize the columns in the Jobs dashboard. ## Add columns to the Jobs Dashboard with dominostats.json To include metrics in the Jobs dashboard that Domino doesn’t provide by default, you can define custom columns. This can be done by using the `dominostats.json` file, letting you tailor the dashboard to better understand and analyze your Job performance. 1. Write a file named `dominostats.json` to the root of your project directory. 2. Use keys in `dominostats.json` to identify the outputs you’re interested in and add the corresponding values. 3. If Domino detects that `dominostats.json` has been written to the Project root by a Job, it parses the values and shows them as columns on the [Jobs dashboard](/cloud/platform-capabilities/core-concepts/jobs). Domino automatically deletes `dominostats.json` before each execution. The following is sample R code that writes three key/value pairs to `dominostats.json`: ```r theme={null} diagnostics = list("R^2" = 0.99, "p-value" = 0.05, "sse" = 10.49) library(jsonlite) fileConn<-file("dominostats.json") writeLines(toJSON(diagnostics), fileConn) close(fileConn) ``` The following is the same data written to `dominostats.json` in Python: ```python theme={null} import json with open('dominostats.json', 'w') as f: f.write(json.dumps({"R^2": 0.99, "p-value": 0.05, "sse": 10.49})) ``` The resulting `dominostats.json` from these code examples looks like this: ```json theme={null} { "sse": 10.49, "R^2": 0.99, "p-value": 0.05 } ``` ## Use .dominoresults and .dominoignore to render specific files in the Jobs dashboard Use the `.dominoresults` and `.dominoignore` files to control which files Domino renders in the Jobs results view. This can be useful to limit your results if many files are changed in your execution, or to exclude unnecessary log files generated during the execution. R language exceptions can be especially large, which can impact sync times. So you may want to exclude the R debug outputs, depending on your use cases. ### Include or exclude single files in the results dashboard To include or exclude only specific files, your `.dominoresults` or `.dominoignore` file must list the relative path to those, each on a new line. The following example excludes or includes `histogram.pdf` and `output.txt` in the top-level directory of the Project. ```shell theme={null} histogram.pdf output.txt ``` ### Use patterns with wildcard characters Domino can use wildcard patterns in `.dominoresults` and `.dominoignore`. This way you can specify groups of files to show. The following example limits the files to PDF documents in the top-level directory, all PNG files in a directory images and text files arbitrarily deep in sub-directories of the Project. ```shell theme={null} *.pdf results/*.png **/*.txt ``` ### Configure Job result views Run results can also be configured to control things like the maximum number of files Domino renders for comparisons and diffs. For more information, please reach out to Domino Support. ## View custom metrics as a time series over time You can see how your custom keys change over time. 1. Click **Jobs Timeline** to expand a line chart of `dominostats.json` values over time. This chart shows all Jobs listed in the current dashboard. To filter to a specific set of related Jobs, [tag](/cloud/platform-capabilities/core-concepts/jobs) the Jobs to create a separate dashboard view. The x-axis ticks on the timeline represent individual Jobs, and the y-axis represents the values for the statistics in those Jobs. 1. Hold your cursor over the chart to see individual data points as tooltips. 2. Click a point to open the details for the Job that produced that value. 3. Click and drag on the chart to zoom in. 4. Click each stat in the legend to toggle its line on and off. ## Email notifications By default, Domino notifies you by email about *failed* Project executions. You and your Project collaborators can also receive notifications about *successful* executions. On successful executions, you receive an email with the last few lines of `stdout`, and up to ten results files from your execution. Domino detects which files were added or changed during your execution, and captures those as the execution’s results. ### Edit notification preferences 1. In the navigation pane, click **Projects**. 2. Go to your Project and click **Settings**. 3. Click **Access and Sharing** and go to **Collaborations and permissions**. 4. Set the **Notifications preference** for users. ## Send custom emails You can create fully customizable Job email notifications with any formatting and results you want. For [Domino File System (DFS) projects](/cloud/platform-capabilities/core-concepts/projects/dfs-projects), create a file named `email.html` in the *root of your project folder* as part of your run. For [Git-based projects](/cloud/platform-capabilities/core-concepts/projects/git-based-projects), create a file named `email.html` in the `/mnt/artifacts/` directory as part of your run. The HTML in `email.html` can be used as the body and subject of the email sent on success. ### Tips and tricks * To include images, reference the path to the image from the root of the folder. The image can be anywhere in your Project. For example, to include an image in `plots/plot1.png`, write ``. * Put all CSS styles in inline `style` attributes. Most email clients ignore `