Alteryx Designer Desktop Discussions

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

Tip: INDB with a .INDBC file using a Dynamic Username

8 - Asteroid

Our enterprise uses Hadoop with Kerberos and keytabs. I set up the INDB connection to use a file.  The file is on a UNC path that all the users ansd the Alteryx server have permission to.  I was going to just have a file for each user, and then we could switch the .indbc file connection for the user that was using the file.


I then went down the path of trying to make that dynamic and the solution I came up with was based on some other users suggestions for a dynamic username, based on a windows system variable. NickC suggested this in this article.   I needed to make this work, I tried using this as a workflow constant.  This did not work.  What I ended up doing blew my mind, I had zero hope that it would work, but it did.


I replaced the username with User=GetEnvironmentVariable("USERNAME") and this worked. Alteryx did not read this as a string but as a command and processed the command. 





    <Connection>odbc:Driver={Cloudera ODBC Driver for Impala};;Port=21051;AuthMech=1;KrbRealm=ABCDEF.CLOUD.COM;KrbFQDN=ABCDEF.CLOUD.COM;KrbServiceName=impala;SSL=0;</Connection>
    <Passwords />
  <AlteryxToDb OutputDriverSelection="Specified">