This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi There, I am building Apps using Alteryx and i need to audit the data. so here is the requirement App User can feed the file thru Interface and run the workflow thru Apps the question is , how do i capture the USER who is executing the Apps and insert the user name into Audit table or the data at runtime ? Thanks saravanan
I thought that I would drop a comment on this as there has been no reponse for a couple of days. I would also like to know how to do this.
For an app running outside of the gallery, I use a Run Command tool, calling the Global Environment variable for %Username% (Thanks to Mike Bryan at Inspire for this). However, I don't think that will work in the gallery environment both from a security standpoint and even if it did run, it may call the wrong environment.
When I look at the Gallery Usage Report app, it calls the user from the MongoDB instance (Collection: Users) and parses the field:"_id" to get a list of Users and to get Session data, it reads the Collection: Sessions and uses the field UserId. The MongoDB instance can be reached using the MongoDB connector tools. The data has to be getting saved at some point, and so I would think that it could be grabbed from the workflow, just not sure where.
I hope this helps a little but, I will be very keen to hear if someone has more information than that (as there must be a better solution).
Would you be able to tell us how this app will be run? From a server or downloaded to each users computer? In the quite limited case of each user downloading the app to their personal computer, would you be able to use the work flow directory variable?
For example my WorkflowDirectory would be c:/Users/Ben.Carley/AppData.... so if I wanted to recover the text Ben.Carley I could use regex.
The expression I would use would be "Users\(.*)\AppData" and then I could use this as I see fit.
Hope this helps but if not, give us a little bit more info and I'm sure we can do something!
If you think this will suit your needs, I can give you details and configurations.
On my apps (which run on our private server), I always have one of the outputs, which the user does not know about, spit the data they are extracting to a YXDB in a folder on the Server. Only I have access to the Server, not my users, so no problem there.
That output looks like this:
"20151229140959_503bac188031af11f8f8e479_APPNAME.yxdb" (you can see the first string is the datetime, the second is the user, and the third is the appname). It will create the yxdb for each run.
I have a separate module that pulls the following user information:
At that point, it's just a simple join to line up your users with the report and/or data that they extracted.
Here is what I do in order to store the app results . . . start a new stream from the last tool that has all the data records, with a block until done. Instantly calc ONE date/time (so all records have only one date/time associated with them, append that date/time to each record, blend in the User ID with the Date/Time in the format I showed in my prior reply above, and output to wherever you want. I use a secured drive on my Server that only I have acces to (meaning the user doesn't even know I'm collecting everything they run . . . my users do not have the ability to see the actual YXWZ . . . only the interface that runs in the Gallery). You have to use a text box configured as "hide" with an annotation of "__cloud:UserId (double underscore).
Here's my final steps that do what I just described:
The output in the YXDB you create then shows like this:
One of the usecases i'm currently working on is see how the row level security (show only appropriate rows to users based on the user login) can be implemented in alteryx. Looks like many of you have come accross this usecase and tried to do it in alteryx.
Any of you know why the "__cloud:UserId" option in the text box tool doesn't return a value when an app is run from a gallery?
I'm noticing it returns the userId sometimes but when i use the same logic in a different app, it returns an empty string. Any ideas?