Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

MongoDB - AS_Results UserName

cmertz
5 - Atom

We are trying to write a quick report showing who is running which applications.   We're looking at AS_Results and noticed we have some AS_Results records who's UserName does not link back to a record in the users collection.  We don't believe we've deleted any of the users so wondering if UserName can point to more than just a users record?

 

We also noticed that a user has fewer rows now in AS_Results than last week.  Is there a process that deletes AS_Results by chance?

 

Thanks,
Craig 

(Version 2020.1)

2 REPLIES 2
PeterA1
Alteryx
Alteryx

Hi @cmertz So the UserName field in AS_Results should map back to the Mongo "_id" field in the AlteryxGallery users table with a tiny bit of parsing. On the mongodb input tool in Designer you will see a box at the bottom of configuration that says "Include Mongo _id Field"

 

PeterA1_0-1626800200423.png

 

You can then do a bit of parsing on this field to map it to the AS_Results "UserName" Field:

 

PeterA1_1-1626800253547.png

Really all you should have to do is strip out the "{$oid.." part before the ID

 

I hope this helps! 

 

Best,
Peter

cmertz
5 - Atom

Peter,

 

Thanks for the reply.  I'm actually doing the query directly in Mongo query tool so the oid isn't a problem.  I agree that the AS_Results.UserName 'should' link to the users._id, but we have about 400 records that don't and that has us baffled.  That's only a small percentage of the results records we have, but it still has us a little concerned we're missing something.

 

I've also taken snapshots of our Mongo database 2 weeks apart and have noticed that Results rows 2 weeks ago are no longer in the current mongo database making me think that records can be deleted and wasn't aware that was possible.  We were going to count on AS_Results and AS_Queue to determine what jobs have been run by which people... but some don't link back to users and others seem to disappear over time... 

 

Thanks for the help.

Craig