In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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

matthewbechard
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. 

 

 

 

 

<InDBConnection>
  <ConnectionType>Impala</ConnectionType>
  <IsNative>True</IsNative>
  <DbToAlteryx>
    <Connection>odbc:Driver={Cloudera ODBC Driver for Impala};Host=host.cloud.com;Port=21051;AuthMech=1;KrbRealm=ABCDEF.CLOUD.COM;KrbFQDN=ABCDEF.CLOUD.COM;KrbServiceName=impala;SSL=0;</Connection>
    <DecryptionAllowed>False</DecryptionAllowed>
    <Passwords />
    <FormatSpecificOptions>
      <ReadUncommitted>False</ReadUncommitted>
      <TableStyle>Quoted</TableStyle>
    </FormatSpecificOptions>
    <Type>ImpalaODBC</Type>
  </DbToAlteryx>
  <AlteryxToDb OutputDriverSelection="Specified">
    <Connection>hdfsa:Hostname=ABCDEF.CLOUD.COM:14000;User=GetEnvironmentVariable("USERNAME");Password=__EncPwd1__;Authenticate=true;KerbType=mit;Tempdir=/user/temp;URL=http://awedva3uthtw01.cloud.tiaa-cref.org:14000/</Connection>
    <DecryptionAllowed>False</DecryptionAllowed>
    <Passwords>mypasswordabcdefg</Passwords>
    <FormatSpecificOptions>
      <EnableCompression>True</EnableCompression>
      <SupportNullValues>True</SupportNullValues>
    </FormatSpecificOptions>
    <Type>HDFS_Avro</Type>
  </AlteryxToDb>
</InDBConnection>

 

 

   

0 REPLIES 0
Labels
Top Solution Authors