We use below option while querying in impala.
set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name;
SELECT * FROM db_name.tablename
I want to extract same table using SAS. However, unable to set this option 'PARQUET_FALLBACK_SCHEMA_RESOLUTION=name' in pass through SQL. Without this option impala looks for column order and wrong values are being displayed.
Please help how this option can be set in Pass through SQL. I tried in '&impala.' connection string and as below statement but it doesn't work -
execute (set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name) by impala;
sample code -
proc sql;
connect to impala (&impala.);
execute (CREATE VIEW IF NOT EXISTS &BASETABLE. as
(SELECT * FROM db_name.tablename )) by impala;
disconnect from impala;
quit;
Are you saying the Impala cannot figure out how to names the variables it reads from a parquet file?
Can you try setting that option as part of the connection string? Will it stay in effect for your whole session once set?
Did you try issuing the SET statement with EXECUTE() before issuing the query with CONNECTION TO () ?
proc sql;
connect to impala (&impala.);
execute by impala (set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name) ;
create table SASDATASET as select * from connection to impala
(SELECT * FROM db_name.tablename )
;
quit;
Did you trying issuing multiple statements at once with the EXECUTE() statement?
proc sql;
connect to impala (&impala.);
execute by impala (
set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name;
CREATE VIEW IF NOT EXISTS &BASETABLE. as
(SELECT * FROM db_name.tablename )
) ;
create SASDATASET as select * from connection to impala
(select * from &BASETABLE. )
;
quit;
Are you saying the Impala cannot figure out how to names the variables it reads from a parquet file?
Can you try setting that option as part of the connection string? Will it stay in effect for your whole session once set?
Did you try issuing the SET statement with EXECUTE() before issuing the query with CONNECTION TO () ?
proc sql;
connect to impala (&impala.);
execute by impala (set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name) ;
create table SASDATASET as select * from connection to impala
(SELECT * FROM db_name.tablename )
;
quit;
Did you trying issuing multiple statements at once with the EXECUTE() statement?
proc sql;
connect to impala (&impala.);
execute by impala (
set PARQUET_FALLBACK_SCHEMA_RESOLUTION=name;
CREATE VIEW IF NOT EXISTS &BASETABLE. as
(SELECT * FROM db_name.tablename )
) ;
create SASDATASET as select * from connection to impala
(select * from &BASETABLE. )
;
quit;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.