Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Set Session Command with Presto

ejtesoriero
6 - Meteoroid

Hi there!

 

I am connecting to a data source via a Simba Presto ODBC Driver.  There was an issue with the field names and was advised to run the below set session command to align the columns correctly.  I am not able to include the command in my SQL Editor or use it in the Pre SQL Statement.  Why am I able to run in DBeaver, but not in Alteryx?  Can you advise on how to successfully run the command?

 

The PreSQL Statement is:

set session datalake.parquet_use_column_names=true;

 

The error I am receiving is:

Error: Input Data (28): Error running PreSQL: "set session datalake.parquet_use_column_names=true;
": [Simba][Presto] (1060) Presto Query Error: line 1:1: Session property datalake.parquet_use_column_names does not exist (14)

5 REPLIES 5
joshuaburkhow
ACE Emeritus
ACE Emeritus

Hi @ejtesoriero 

 

I haven't seen the set session with underscores...I think it should be with dashes "set session datalake.parquet-use-column-names=true"

 

Try and see if it works 😉 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
ejtesoriero
6 - Meteoroid

Still getting an error, but now it is different:

Error: Input Data (28): Executing PreSQL: "set session datalake.parquet-use-column-names=true" : [Simba][Presto] (1060) Presto Query Error: line 1:29: mismatched input '-'. Expecting: '.', '=' (1)
Error: Input Data (28): Error running PreSQL: "set session datalake.parquet-use-column-names=true": [Simba][Presto] (1060) Presto Query Error: line 1:29: mismatched input '-'. Expecting: '.', '=' (1)

 

Then I tried replacing the '-' with '.', but getting a different error:

Error: Input Data (28): Executing PreSQL: "set session datalake.parquet.use.column.names=true" : [Simba][Presto] (1060) Presto Query Error: line 1:1: Invalid session property 'datalake.parquet.use.column.names' (14)
Error: Input Data (28): Error running PreSQL: "set session datalake.parquet.use.column.names=true": [Simba][Presto] (1060) Presto Query Error: line 1:1: Invalid session property 'datalake.parquet.use.column.names' (14)

kelly_gilbert
13 - Pulsar

Try a combination of the two! (period after your catalog name, and period after parquet, but hyphens in the use-column-names property):

 

datalake.parquet.use-column-names=true 

 

ejtesoriero
6 - Meteoroid

I am still getting an error using the command set session datalake.parquet.use_column_names=true

 

Error: Input Data (1): Executing PreSQL: "set session datalake.parquet.use_column_names=true" : [Simba][Presto] (1060) Presto Query Error: line 1:1: Invalid session property 'datalake.parquet.use_column_names' (14)
Error: Input Data (1): Error running PreSQL: "set session datalake.parquet.use_column_names=true;": [Simba][Presto] (1060) Presto Query Error: line 1:1: Invalid session property 'datalake.parquet.use_column_names' (14)

 

My manager suggested using the Run Command Tool.  I have never used that tool before, but researching it now.  Do you think that would be the fix?

PhaniV
8 - Asteroid

Once EMR cluster was reset, it resolved similar issue. 

Labels