Can two LookML Projects use the same git repository?
Hi Melissa,
Congrats on your first post!
Yes it is possible to point two projects to the same git repository. I’m interested in hearing why you’re looking into this, however. We see some customers use this setup when they’re trying to sync LookML across multiple Looker environments. You can read more about that here.
Outside of that use case, I cannot think of other reasons to point two projects at a single repo. Can you elaborate on what you’re looking to do?
Cheers,
Jesse
Hi Jesse,
Is it possible to have one repository for multiple instances, but every instance would connect to different database (different connection name in .model file)? Something like every instance would have its own .model file?
Cheers,
Kornel
Hello Kornel,
That’s exactly what we do. Essentially, we have many instances (spoke-and-gear style). Each instance has a skeleton project containing the following files:
instance.model
manifest.lkml
And a folder called,
instance/
Inside the instance.model
we have something like,
connection: "this_instances_connection"
include: "//base_project/*.view.lkml"
include: "/instance/*.view"
The base_project
is a local dependency which contains all of our LookML. The instance/
contains anything which is specific to this instance.
Insinde the manifest.lkml
we have,
project_name: "this_instance_name"
local_dependency: {
project: "base_project"
}
This allows us to have one copy of our LookML for all of our instances, while having the ability to add code to this specific instance.
The process still confuses me a bit, so hopefully I’ve not typed anything wrong above. YMMV.
Helpful links,
Kind regards,
–Thomas
Hi @thomas_brittain , thank you for your post, I’ve run into this issue and support was unable to help me come up with a solution. I wanted to clarify how you’ve set up your projects:
Thanks,
Daphne