Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Server Discussions

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

Migrating workflows from one environment to other.

Ranjith15
7 - Meteor

I am having situation like, I have to move the worklfow from UAT to Prod

From UAT the workflow has to write output to D drive. once the workflow migrated to Prod it has to write output to E drive. But I have to achieve the above condition without modifying workflow connection properties.

 

In Informatica we do have connection option to create connection with same name in each environment, but it will point to destination as per the environment(UAT D- drive, Prod - E drive). So no need to modify the connection properties on each migration and we can able to achieve the above business logic. 

 

Is any similar option is available in Alteryx too?

7 REPLIES 7
jamielaird
14 - Magnetar

Hi @Ranjith15 

 

You could possibly achieve this by defining the drive as a workflow constant (e.g. [User.Drive] = D), building the file paths for the output tool using this constant in a Formula tool and then at the migration stage updating the workflow constant value from D to E.

 

This isn't very user friendly so you might want to experiment with building custom output tools that wrap up the file path creation process and configuration of the output tool.

 

You could also edit the XML at the migration stage to replace instances of D:\ with E:\.

jamielaird
14 - Magnetar

I just spotted that @BenMoss is online and he might have a smarter suggestion on how to do this. Ben hope you don't mind me volunteering your help 🙂

Ranjith15
7 - Meteor

@jamielaird Could please provide brief overview of XML migration?

jamielaird
14 - Magnetar

Hi @Ranjith15 

 

I'm referring to the ability to open a YXMD file in a text editor. If you do this you will notice that it is simply an XML file. You can easily locate the lines that relate to different aspects of your workflow and edit the text.

 

Screenshot_2019-06-26_at_09_41_09.png

Ranjith15
7 - Meteor

Thanks @jamielaird , but still we need to make configuration changes before migration using these methods.

KoCo
7 - Meteor

We have tried a few approaches for this and the below 4 have been working the best.

 

First option : Encapsulating into macros. Worked really well, an environment selection macro passes it's selected control parameter to a dynamic input (encapsulated in a macro), which then loads or writes the file to the correct environment depending on the environment selection. Only one change on each flow upon promotion - the environment selector.

 

Second option : A Migration flow, which loads the xml (Import with \0 as a delimiter) and then does a search and replace on the paths, and subsequently outputs as xml again. Once this works, you can combine it with a directory read of the flows to be migrated on your UAT side, which outputs to migrated flows on your production side. (ie work with two code libraries)

 

Third : Quickest, but not that well controlled. Open all xml flows in notepad++, do a find and replace across all files open, and then a save all in the same place or a different place.

 

Fourth : Put a Path file or macro on each server environment which will be a prefix to the path (combined with dynamic inputs of the first option). Then it's a sort of Environment Setting on a specific machine or code library.

Ranjith15
7 - Meteor

Hi @KoCo 

 

Thanks for the Reply. 

 

The solution one and four seems to be perfect solution. Do you have any sample code for the mentioned approaches?, so that i can able to understand in a better way.