Include database in values of ${tbl:DATASETNAME} variables

Marlan
Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 319 Neuron

I often use the "Allow SQL across connections" feature in SQL recipes and typically specify an output dataset as the connection to use for running the recipes.

In this scenario, I need to specify the database for any input tables that are in a different database than the output database.

It would seem I could just use the dataset variables ${tbl:DATASETNAME} to reference input tables in a different database. However, the database name is not included in the variable value. A schema if specified is included so we are part way there. I can't think of why the database couldn't be included as well. This would be retrieved from the dataset connection at run time so would always be consistent with the connection.

This way cross connection scripts could be written without hard coding database names. Why hard code something that DSS already knows via the connection? I often work around this by storing the database name in project variable but this adds complexity and just seems unnecessary.

2
2 votes

New · Last Updated

Setup Info
    Tags
      Help me…