Follow

Project Dependencies

You can configure projects that import files and/or environment variables from other projects. This allows you to factor your team’s analyses into reusable building blocks, and avoid unnecessary repetition/duplication of information.

For example:

  • A canonical dataset used by multiple projects can be managed in a single place.
  • Your code can reside independently of your data. No need to duplicate/sync large datasets within multiple projects on your local machine.
  • An external data source requiring login credentials (such as a database) may be securely represented via environment variables in a single project, and then used by many projects.
  • Results from one model (such as trained model files, or R workspaces/installations) can be imported and utilized by multiple different downstream projects.
  • If a project's files are organized as an R or Python package, then you can configure other projects to automatically install them at runtime.


How it works

You can configure projects to "export" files and/or environment variables they define. 

Other projects can import those projects which export something (setup instructions below). After you’ve done so, files and/or environment variables from those projects are accessible when you run code in the importing project.

During runs with imported files, each project directory is located at /mnt/<username>/<project name>, where <username> is the owner of that particular project. Imported directories are read-only. 

WARNING: The path of your main project will also change from /mnt to /mnt/<username>/<project name>. If you have hardcoded any paths in your projects to /mnt, we recommend replacing the hardcoded paths to using the $DOMINO_WORKING_DIR environment variable. This will ensure the correct path regardless of whether other projects are imported. See the support article on Domino Environment Variables for more information.

 

Setup 

  1. Make sure you have Owner, Collaborator, or Project Importer access to the project(s) from which you wish to import data.
  2. For each of these projects, visit it in the UI, and click "Exports" on the lower left sidebar. Under “Exports”, check “Files” and/or "Environment variables", depending on which you wish to import. To export as a package, select the appropriate language from the "Code Package" dropdown.
  3. Now go to the project into which data will be imported. Choose "Files" from the left sidebar. Under imports, add the project(s) using the format <username>/<projectname>.

Any imported environment variables will be displayed on that page also:

          

 

Setup (versions <1.46 of Domino)

  1. Make sure you have Owner, Collaborator, or Project Importer access to the project(s) from which you wish to import data.
  2. For each of these projects, visit it in the UI, and click "Imports/Exports" on the lower left sidebar. Under “Exports”, check “Files” and/or "Environment variables", depending on which you wish to import. To export as a package, select the appropriate language from the "Code Package" dropdown.
  3. Now go to the project into which data will be imported. Again choose "Imports/Exports" from the lower left sidebar. Under imports, add the project(s) using the format <username>/<projectname>.

Any imported environment variables will be displayed on that page:

          

 

Was this article helpful?
0 out of 0 found this helpful

Comments