Alteryx Designer Desktop Discussions

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

passing username and password in macro

albert_alaluf
9 - Comet

Happy new year to all,

 

This workflow has around 30 different queries and 6 fields to update dynamically. With regular dynamic input, it is working. I recently received a requirement that the dynamically updated script should be included to the output. This means I should repeat text/action pair 180 times which it is time consuming and increase the complexity. This is why I created a basic macro. Please see partial work below.

 

albert_alaluf_1-1640709966929.png

 

The text inputs have SQL scripts. I union all into one file. This gives me a flexibility when I need a change on any script without interfering the others. Then I used find/replace to change the values dynamically by getting user inputs from text interface tool. .

I created a basic macro to pass dynamically multiple queries through in-database. The blue macro has inDB tool. Please see below.

 

albert_alaluf_0-1640709425823.png

The macro provides the data and the scripts created dynamically. I tested this and is working.

 

So, I want to add an additional step that I want the users use their own credentials. I already embedded my credentials, however this should be by the user who runs the app.

 

As you imagine, I can't update the user credentials outside from the macro. I believe I should do it inside the macro, but I couldn't figure it out yet.

 

Any suggestions?

4 REPLIES 4
csmith11
11 - Bolide

I put together a sample Macro that uses credentials. I'm not sure if this is too simple for your use case, but its my go to approach.

csmith11_0-1640713530245.png

 

csmith11
11 - Bolide

It sounds like you want to update the Connection Credentials. So each user would be using their own credentials to connect to the database instead of yours. Is this correct?

csmith11
11 - Bolide

Okay.. so a couple of things. 

If your intent is to upload to Alteryx Gallery, it is my understanding that InDB connections must be made with Files instead of Shared Connection. See here for more info. https://community.alteryx.com/t5/Alteryx-Server-Discussions/IN-DB-Data-Connection-on-Server/m-p/3173...

 

 

If your intent is to just share this Macro via shared drive: then each user will need to set up the InDB connection on their individual machines.

 

Options>Advance Options>Manage InDB Connections

 

Here they can create an InDB connection using their own credentials with the same connection name that you used to build the tool

 

Once they have a connect to the database with the same name, the macro/workflow should run without issue on their machines.

 

 

albert_alaluf
9 - Comet

Hello @csmith11 ,

 

You're right (and confussed one more time with regular tool). As soon as they have DSN name defined on their machines, I will be good. Most likely we use same name, this will not be an issue. If the user don't have access to the table, it will be denied.

 

Publishing to the gallery is still a challenge. I know I should use File DSN, I don't like to do this. I think I will avoid publishing to the gallery for now, and the tool will be used by only my team, I think I'm OK.

Labels