MongoDB - AS_Results UserName
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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)
- Labels:
- MongoDB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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"
You can then do a bit of parsing on this field to map it to the AS_Results "UserName" Field:
Really all you should have to do is strip out the "{$oid.." part before the ID
I hope this helps!
Best,
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
