By default, Looker passes user_id and history_slug in the query context.
I wanted to check if there’s a way to include Looker user_attributes in the Looker Query Context.
Reference: Looker SQL Comments Documentation
Additionally, would it be possible to achieve this using a custom JDBC implementation
As for modifying the context, I don't think so. You could sneak them into the query text though.
explore: my_explore {
sql_always_where: 1=1 /* { { _user_attributes['my_user_attribute'] }} */;;
}
(note: i had to use { { instead of {{ to overcome some type of website function blocking my post)
But if I had to guess, you are likely trying to pursue some combination of looker attributes and database activity, which can also be solved by combining the two datasets (your various database history tables with the various system activity tables). There is no easy way to get at Looker's system activity model, but the tables can be exported either with elite system activity (recommended, but might cost extra depending on your looker platform level) or various more custom methods this one from Plum Data or this one from the looker community.