Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Server Discussions

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

Running db queries/python scripts from text files vs common embedded way - Alteryx Server

Felipe_Ribeir0
16 - Nebula

Hi all!

 

Normally i (and i suppose most of the people) use embedded queries in the in db tool of the workflow and python codes in the python tool of each workflow.

 

The thing is, i saw some topics here on the community about people keeping the scripts of the queries and python codes on network shared folders, and importing these scripts into Alteryx.

 

1)For example, it is possible to run python codes with the cmd (https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Run-a-python-script-in-Alteryx/td-p/10...) or  with this macro https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Python-Code-Tool-Script-Runner-Macro-C...

 

2)For example, it is possible to run queries with the dynamic input/dynamic input in db/batch macro input (https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Read-and-Execute-sql-file/m-p/1032052#...)

 

At first it seems like a good idea, it allows you to reuse the same script for different workflows, easily use the same script with another tool, etc.

 

The question is, somebody here is doing this instead of the common embedded way in a production environment of Alteryx Server, and with lots of workflows? Do you feel that this is a lot better than the common way/do you recommend doing it/do you think that this is a good practice?

 

Thanks!

3 REPLIES 3
TimN
13 - Pulsar

Hi,

We did not see this as a best practice if the code could be changed without oversight \ governance.  As long as the code is managed properly, my opinion is that it would be fine.  We do it for Python code for a particular Use Case.  Here is a related article to #1 above.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Alteryx-vs-Version-Control-Code-Repo-G...

 

Regards,

Tim

Felipe_Ribeir0
16 - Nebula

Hi @TimN 

 

Thanks for sharing this, i didnt know that we had this topic around. You are right, without this it could become a mess.

 

About your particular use case, can you share more info about why you do this specifically just for this case?

TimN
13 - Pulsar

Hi @Felipe_Ribeir0 

It's a long story but at my company we centralized Alteryx in Systems.  We give out designer licenses to Power Users and they have to follow the governance we lay out from a committee comprised of Business and Systems people.  Power users are on the business side and their technical skills can vary from a beginner learning Alteryx to Data Scientists with advanced Python knowledge.  One department that we gave designer to built most of their processing (they built an ETL process) in Python.  They wanted to inject the Python code into their Alteryx workflows running on the server and they wanted to store the Python code where they could change it without going through SDLC.  We allow them to store their code outside of Alteryx and "inject" into their WFs but the code is stored where they can only change it by going through the governed process.

 

Regards,

Tim