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

Usage

remote_dependency: public_project {
  url: "git://github.com/llooker/project.git"
  ref: "07a20007b6876d349ccbcacccdc400f668fd8147f1"
  override_constant: constant_name {
    value: "string"
  }
}

Hierarchy

remote_dependency

Default Value

None

Accepts

  • A url subparameter that includes the URL of the Git repository
  • A ref subparameter that includes the SHA of a commit in the Git repository
  • An override_constant subparameter, which is used to override the value of a constant imported from another project

Definition

remote_dependency specifies the name of an external Git repository containing a 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 specify a project with the remote_dependency parameter. You can include multiple remote_dependency statements in the manifest file to import multiple files or from multiple projects.

remote_dependency has three subparameters:

Example

In a manifest file, add the “Zendesk Block” Git repository as a source to import files from:

project_name: "thelook" remote_dependency: { url: "git://github.com/llooker/zendesk_block.git" ref: "6a95679c92efa56243c17fb4d66c820cd4a8db03" }

Things to Know

Overriding Imported Constants With override_constant

The override_constant parameter can also be used with the local_dependency parameter for local 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 connection defined in the imported project’s manifest file:

constant: connection { value: "imported_project_connection" 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" remote_dependency: public_project { url: "git://github.com/llooker/project.git" ref: "07a20007b6876d349ccbcacccdc400f668fd8147f1" override_constant: connection { value: "importing_project_connection" } }

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

Top