Submit your innovative use case or inspiring success story to the 2023 Dataiku Frontrunner Awards! LET'S GO

Way to include current user ID in SQL table names?

Marlan
Way to include current user ID in SQL table names?

Hello all,

Does anyone know of a way to automatically include the current user ID in SQL table name. I've seen references in the documentation to the variable dssUserLogin so I thought the following might work:

${projectKey}_${dssUserLogin}_TABLENAME

However this variable is not recognized in SQL recipes.

I also tried creating a user property but this didn't work either:

${projectKey}_${userProperty:user_id}_TABLENAME

Note that I am on version 8.02 so maybe one of these might work on version 10?

I realize I could create an instance variable but I can't see how I could set this to the current user when the user logs into DSS. I could set it at the beginning of a flow in a Python recipe but that would be pretty awkward and painful to do for every project. 

Any ideas?

Thanks,

Marlan


Operating system used: Linux

0 Kudos
2 Replies
Manuel
Dataiker Alumni

Hi Marlan,

What are you really trying to achieve?

If you are looking to enable some sort of concurrency between users of the same flow, you should look into Dataiku Applications, which instantiates copies of the same flow and achieve a similar result to what you describe.

I hope this helps.

0 Kudos
Marlan
Author

Thanks @Manuel.

Good idea about Applications.  They could be part of the picture.

It's kind of an esoteric situation and actually not clear what exactly we'll need. We are transitioning to Snowflake and will have this unique permissions set up for one of the databases that a lot of our analysts use where only the user who created tables initially will be able to drop them. The concern is being able to refresh data in tables when the creator of the tables are absent. Scenarios actually may provide most of what we need. 

Thanks!

Marlan

0 Kudos

Labels

?
Labels (1)

Setup info

?
A banner prompting to get Dataiku