PDT Regenerator Using Multiple Models

I have a model with 2 `.model.lkml` files, which use 2 different connections and share views.

I have a function/macro in manifest.lkml called get_schema, which determines what schema to use based on a user attribute.

This function is used across views.

When users are querying explores or dashboards it works fine, but when PDT builds happen it errors out, 

The PDT regenerator doesn’t know which schema to use, and uses the default one, so PDT builds for 1st Connection work, but 2nd connection fails saying it can’t find the schema.

Any way I can use user attributes or PDT overrides to say if you are building for Connection A, use this schema, for Connection B use another schema.

0 1 87
1 REPLY 1

The function/macro refers to constant in manifest.lkml file.

I think I found a way for this, I’ll post my further findings post PDT regen completes.

In the constant `get_schema`, instead of switching schemas based on `_user_attribute`, which is not accessible during PDT build, I am switching based on _model._name liquid variable.

Top Labels in this Space
Top Solution Authors