Usage
Hierarchylocal_dependency |
Default valueNoneAccepts
|
Definition
To use this parameter, you must have the experimental Labs feature Local Project Import enabled. Experimental features are not fully developed and may be significantly changed or completely removed.
local_dependency
specifies the name of another LookML project that has files that you want to use in this project. When importing files from another project, you must create a manifest file and use the local_dependency
parameter to specify a project from which to import files.
You can use the project
subparameter of local_dependency
to specify the name of a single project to import files from. To import files from multiple projects, you can include multiple local_dependency
statements in the manifest file.
Constants can also be passed between projects using project import, and the override_constant
parameter can be used to override the constant’s value in the importing project. After you have added local_dependency
parameters to specify other projects, use the include
parameter to add individual files.
The Looker IDE automatically creates an imported_projects
folder when you import a project. Files from both local projects and remote projects are listed in the imported_projects
folder. See the Working with folders in the IDE documentation page for more information.
Example
In a manifest file, add the projects “IMPORTED_PROJECT_1” and “IMPORTED_PROJECT_2” as sources to import files from:
Things to know
Overriding imported constants with override_constant
The
override_constant
parameter can also be used with theremote_dependency
parameter for remote project import.
When importing files from one project into another, you can override the values of constants defined in the imported project’s manifest file. When you override a constant’s value, imported files that reference that constant will use the new value provided in the importing project.
When the export
parameter is set to override_required
or override_optional
for a constant defined in the imported project, the override_constant
subparameter of local_dependency
can be used to provide a new value for that constant. For example, suppose you have a constant schema
defined in the imported project’s manifest file:
In this example, because the export
parameter is set to override_required
, its value must be overridden in the importing project’s manifest file:
See the Importing files from other projects documentation for more information and another example of overriding constants in importing projects.