User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
local_dependency

Usage

local_dependency: {
  project: "other_project"
  override_constant: constant_name {
    value:"string"
  }
}

Hierarchy

local_dependency

Default Value

None

Accepts

  • A project subparameter, which accepts a string specifying the name of another project that has files that you want to include
  • An override_constant subparameter, which is used to override the value of a constant imported from another project

Definition

To use this parameter, the experimental Labs feature Local Project Import must be 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 include multiple local_dependency statements in the manifest file to import multiple files or to import from multiple projects.

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.

Example

In a manifest file, add the projects “IMPORTED_PROJECT_1” and “IMPORTED_PROJECT_2” as sources to import files from:

project_name: "thelook" local_dependency: { project: "IMPORTED_PROJECT_1" } local_dependency: { project: "IMPORTED_PROJECT_2" }

Things to Know

Overriding Imported Constants With override_constant

The override_constant parameter can also be used with the remote_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:

constant: schema { value: "imported_project_schema" export: override_required }

In this example, because the export parameter is set to override_required, its value must be overridden in the importing project’s manifest file:

project_name: "importing_project" local_dependency: { project: "imported_project" override_constant: schema { value: "importing_project_schema" } }

See the Importing Files from Other Projects documentation for more information and another example of overriding constants in importing projects.

Top