User Attribute in Manifest

Does anybody know if it is possible to use an user attribute in the manifest of a project? I need to use the user attribute to concatenate the name of the view (in my database) that the user will have access to.

I have a constant in my manifest for the view name:

constant: warehouse_view_name

and the value I need to assigned would depend on the user attribute: user_attribute + “_warehouse”

Hi Maria, this is possible! You can use the _user_attributes liquid variable to accomplish this.

For example:

constant: first_name {
value: “{{ _user_attributes[‘first_name’] }}”
}

1 Like

Can we create constant in manifest for dynamic connection and use in model file ?

Manifest File:

constant: connection {
value: “{{ _user_attributes[‘db_connection’] }}”
}

Model File:
connection: “@{connection}”

1 Like