How to extend existing model from one connection to the other?

  • 19 June 2020
  • 4 replies

Userlevel 1

I can see the VIEWS and MODELS coming from the source through remote dependency, but I am not able to use EXTENSION: Required (on the core_model, with connection_1) and EXTENDS: [core_model] (either same connection_1 or a different connection_2.) and get all the joins associated with the explore automatically. Do I have to write all the joins in the new model again? I wish I could use the code. Thanks,

4 replies

Userlevel 5

You cannot extend from a remote model because that creates a conflict with the connection.

I would suggest you put your explores into a generic lkml file something like my_explores.explore.lkml then include that file into your other project’s model using

include: "//exact_location_of_file**my_explores.explore.lkml"

Then you can extend those explores.

Help article here

Userlevel 1

Thanks for the suggestion! However, the model in “//exact_location_of_file**my_explores.explore.lkml” could only be extended within the project using the same connection, isn’t it? I get that.

Userlevel 5

No, it’s actually the whole point of having explores in lkml files and not model files. It will allow you to extend those explore with the connection of your choice (in another model)

Can you extend to another project or does it have to be a model within the same project?