Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Download .yxmd file from Mongodb (Scheduler db)

JBN
6 - Meteoroid

Hello Alteryx experts, 

 

Is there way I can download the scheduled yxmd file from mongodb ?

 

Accidentally we have lost the local copy, But we have scheduled that workflow yesterdy using "Run a copy of the workflow stored in the schedulre db" option. So, Can I download that yxmd file out of mongodb ?

 

Thanks

JB

11 REPLIES 11
patrick_digan
17 - Castor
17 - Castor

Hi @JBN! I've created the attached workflow. It's pretty rough, but I'm hoping it will work for you without much modification. You will need the Mongo password from the system settings on the server. You will need to tell me whether it's a YXMD or YXWZ ( I got lazy and didn't program that in...). You will also need to tell me what Module you're looking for. It will use the contains formula to find all the instances of that module, and just pull the one from the bottom of the Mongo. It should save it out as a yxmd (or yxwz).

 

 

It worked for me, but let me know if come across any problems (or need any more details)!

JBN
6 - Meteoroid

Awesome and Appreciate your effort in making this workflow. Thanks alot patrick_digan. You are a life saver. :)

 

Thanks

JB

levell_x_dunn
10 - Fireball

really cool concept and idea.. nice Job @patrick_digan

WayneWooldridge
Alteryx Alumni (Retired)

One think to be aware of... if the workflow is large, it is 'chunked' and this method may not work.  This method works great if the workflow is relatively small.

andre347
10 - Fireball

Thanks @patrick_digan!

 

Great solution and I've used this a couple of times internally. However, I'm applying this to a MongoDB of a client and run into an issue that it's only writing out one row of data rather than the blob output (__ServiceData). The output csv is therefore only 1kb and you get the error message saying 'Attempted to skip more lines than in the file. Please check import line'. The workflows/apps are quite big so it might be that they're chunked. But I can't find a way to stitch them together because there is no field I can group the results by in the  AS_App_Chuncks collection. It's also not truncating the blob field. It's just not outputting the workflow XML.

 

Any ideas what might go wrong here?

 

issue.PNG

patrick_digan
17 - Castor
17 - Castor

@andre347 I had a quick look and came up empty. I'm not sure how to get the workflow if it gets chunked.

BenMoss
ACE Emeritus
ACE Emeritus

Can anyone advise on this; we are trying to access the XML of all assets stored on the server (none are .yxzp's due to how we have set up the server, so we only have yxwz files and yxmd files stored (assets are all always unchecked), and we also do not load macros). 

 

I've used @patrick_digan's workflow as a base, but every single workflow I pull down is outputted as a 1kb file. 

 

Does anyone have any tricks up their sleeve that would allow us to do this?

 

Our usecase is quite simple. As the admin team, we want to monitor the XML files to see how they are documented, this would include scanning the xml file for comment boxes which are coloured in a specific set of hex colours. 

 

Thanks in advance!

 

Ben

patrick_digan
17 - Castor
17 - Castor

@BenMoss If your server is version 11.3+, I would highly recommend the Admin API. I've got a post about it here. Instead of trying to get data out of the MongoDB directly, they now have an admin API where you can do things like download all of the workflows in your gallery using various endpoints. I've had a lot of success with it.

BenMoss
ACE Emeritus
ACE Emeritus

Thanks @patrick_digan, I will check out this option. Are you around next week in Colorado :), can we catch up about this then?

 

Ben

Labels