BookmarkSubscribeRSS Feed
anandmgjsa
Fluorite | Level 6

Hello,

I am connecting to Impala. When I am using single variable, there is no error.But if i add another variable a cli error comes.

Error is:CLI prepare error: [cloudera][ImpalaODbC] Query analysis error occured during query execution.

I am using the below code:

proc sql;

%conxnimp(eap_v,implink,db,dbmax_test = 30)

create table banners as select * from connection to implink

(

select * from(

select ccsid,mis_dt

from event

where mis_dt = '2021-04-28'

)b

)a;

quit;

 

when i run with 'ccsid' in select it runs and gives o/p. But on adding mis_dt it gives the mentioned error.

 

 

 

1 REPLY 1
Patrick
Opal | Level 21

There is definitely an unnecessary select * in your code (code should still be valid though).

What happens if you execute below with one select * removed and with a semicolon after the macro call (just in case the macro call doesn't create a connect statement that ends with a semicolon).

options sastrace=',,,d' sastraceloc=saslog nostsuffix;
proc sql;
  %conxnimp(eap_v,implink,db,dbmax_test = 30);
  create table banners as 
    select * 
    from connection to implink
      (
        select ccsid,mis_dt
        from event
        where mis_dt = '2021-04-28'
      )
    ;
quit;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 570 views
  • 0 likes
  • 2 in conversation