That takes the user id of whoever is logged in, makes it available in your SQL call. I’m doing this now to limit a user to geography by searching a security table, based on BOUSER. Same as CurrentUser(), but I don’t think that would be available to the database engine.
You can also use BOUSER in the connection to login to your database as a specific user, limit data at the database level (which only works if your user is authenticated to the db).
Thanks, thats a valuable information,
Then, what is the “Manage Access Restrictions” option in the universe? (It has Available Restrictions on the left and Available Groups and Users on the Right)
That’s a big topic - you can use it to create a restriction based on SQL you create, for one thing. This lets you create a rule and apply it to a group, but it also will let you create a custom connection, swap out a table for certain users, and more.
I set up a rule to apply a filter based on country code in one, applied that to users I wanted to limit by their IDs - this is a medium easy way to do row restrictions.
it’s more like you can use them in conjunction - plug in SQL to limit a table, apply that to a table, apply the restriction to users:
Resort.country_id in ( select country_id from sales_person_geog_lookup where BO_USER= @variable('BOUSER') )
That’s a sample I created on Island Resorts (resort table), using another table to store user / country information (lookup). Restriction applied to “country” users.