Support Questions

Find answers, ask questions, and share your expertise
Welcome to the upgraded Community! Read this blog to see What’s New!

Beeline equivalent for hive cli -v

New Contributor

I am looking for beeline equivalent for hive cli -v(echo executed SQL to the console).  In beeline --verbose mode is there but it does not echo executed SQL like cli does. It just shows the error and debugging info. Is there any way i can get executed SQL for beeline?

sample queries)

hive -v -e "alter table table1 drop partition(keyword='value');" > test.log  - add SQL to test.log

beeline --verbose -e "alter table table1 drop partition(keyword='value');" > test.log  - does not add SQL to test.log


Rising Star

@Ganeshk Can you please share hive version used for both cases?

are you using custom logging for beeline in both cases?

New Contributor

@AsimShaikh  version used for hive cli 1.2.1. Version used for beeline 3.1.3. I am using shell script redirect just to log into a log file. hive -v -e "alter table table1 drop partition(keyword='value');" > test.log

Expert Contributor

@Ganeshk Yes, we do not have any flag equivalent to -v in beeline. However, if we are looking for the command itself, you could find it in the line stating "Compiling command" or "Executing command"