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 Designer Desktop Discussions

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

Can an ip, port, username and password be read off a file for accessing an sftp site?

Ben-10
5 - Atom

I have a workflow that transfers a file to an sftp site and have defined the sitename and ip through a formula tool. then last step is using the download tool to defined the "connection" with a username and password.

The workflows executes successfully if i hardcode the username and password. However, i find that everytime we move from DEV to TEST to PROD environments, we have to go to each workflow and then keep updating the workflows to point to the proper stp with updated username and password. Is there a way to define the sftp ip, port, username and password in a file and then dynamically read it off the file?

 

 

3 REPLIES 3
BrandonB
Alteryx
Alteryx

You could put the download tool in a macro which takes input parameters based on interface tools that are connected. Do you have experience building a batch macro yet? If not, I would suggest taking a look at one of the following: 

 

https://community.alteryx.com/t5/Videos/Build-Your-First-Batch-Macro/td-p/52900

https://community.alteryx.com/t5/Videos/Build-Your-First-Macro/td-p/51352

Ben-10
5 - Atom

Thank you for the update. Im still learning the ropes around this so the link is definitely helpful. Could you provide an example of reading a string from into the download tool within a macro so that we can get a head start on this?

BrandonB
Alteryx
Alteryx

It would most likely be something like this. The action tools are connected to the tools that require a configuration change and control parameters connect to the action tools. 

 

macro 1.png

 

This macro can then be inserted into a new workflow. After saving it, in a new workflow you right click, insert, and go down to the macro selection. After browsing to the macro location it will then insert it as shown below:

 

macro 2.png

 

The configuration of this new macro represents the fields from upstream data that will pass the values through to be used in the macro. For each row of parameters that are passed into the macro, the macro will run once. So if you have 5 sets of parameters, the macro will run 5 times and stack the data at the end. 

 

Hopefully this helps!

Labels