Hey guys,
does anyone know if it is possible to dynamically call a constant based on one parameter the user selects?
I have two constants defined in the manifest file:
constant: schema_version__de {
value: “v1”
export: none
}
constant: schema_version__at {
value: “v2”
export: none
}
I defined a parameter:
parameter: country_code {
type: unquoted
default_value: "de"
allowed_value: {
label: "DE"
value: "de"
}
allowed_value: {
label: "AT"
value: "at"
}
}
}
and inside a view i need to create the mapping to a table:
sql_table_name: `my_database.@{schema_version__{% parameter country.country_code %}}
so that the constant is picked up based on the user country selection.
Unfortunately this does not work.
The output is:
SELECT
*
FROMmy_database.@{schema_version__de}.my_table
Thank you.