We are in the final days to enter our Data and Analytics - "What's your why?" raffle with SparkED!

Reply with your "why" in text/video format to our forum post by January 28 to be entered! 

Alteryx Server Discussions

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

Setting DB String via Macro Control Param / Action Doesn't Work on Server

PaulFields2
8 - Asteroid

I have a workflow that uses a batch macro to dynamically set the DB connection string on a Data Output node as in the image below. I set up a "dummy" DB connection (which is a valid one), then pipe in the real one I want to use (environment specific) via the macro's Control Parameter at runtime.  Everything works great locally, but when I publish to Alteryx Server I get an Unable to translate alias message also shown below.  

 

Any ideas of what I can try?

 

PaulFields2_0-1641850991346.png

PaulFields2_2-1641851106060.png

 

 

 

8 REPLIES 8
atcodedog05
21 - Polaris

Hi @PaulFields2 

 

By seeing this post of yours (link) I am guessing this issue is solved.

 

The issue here is I can see you are using saved data connection alias which was configured on your desktop. Now when you move the workflow to gallery and try to run it Gallery doesn't have the saved data connection alias hence you are getting the below issue. The workaround is to use actual connection string or you can ask the gallery adim to configure this saved data connection alias

 

Hope this helps : )

PaulFields2
8 - Asteroid

Thanks for your reply. Not sure how I implied the issue was fixed . . . it isn't. 

 

I did ask my server admin to create a saved db connection, but unfortunately because of the sensitivity of the environment (bio-pharma) I am not allowed to share the DB password for production with him. 

 

I'm going to shift to using an (.indbc) connection and see if that works.

 

Thanks

atcodedog05
21 - Polaris

Hi @PaulFields2 

 

Use the complete connection string which you used to create saved connection that will also work. 

 

Like below

 

atcodedog05_1-1641912519207.png

 

Hope this helps : )

PaulFields2
8 - Asteroid

I tried that, but somehow the replace string function doesn't work with a fully expressed DSN-less connection string. Maybe it's the length of the string or some of the characters in there.  

 

BTW - how would I get the non-DSN-less string from the aka:ALIAS value?

 

apathetichell
16 - Nebula

can you share the config of your action tool? It should be repalceable. There may be a second parameter in the same input data that you need to change as well though. Quotes can be fairly specific on string replace as well - especially with DSN...

 

points to @atcodedog05 for noticing that this was Oracle.

atcodedog05
21 - Polaris

Hi @PaulFields2 

 

Either the DNS is there in managed connection of Alteryx (check by navigating like below)

 

atcodedog05_0-1641919095511.png

 

Or DNS in system. Check 3rd point(3. Connection Type: ODBC) in the below article 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-to-Connect-to-an-Oracle-Databas...

 

Hope this helps : )

 

 

atcodedog05
21 - Polaris

Hi @PaulFields2 

 

Nope i don't whether this is oracle its not given. This is the article I could find😅. The process for any db connection would be similar.

PaulFields2
8 - Asteroid

Thanks for taking a look at this, however I've decided to go with in-DB connections and (.indbc) connection files instead of this approach.  I'm still having challenges though, as described in this new post.

 

We can close this thread now.