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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 834 views
  • 0 likes
  • 2 in conversation