Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Running sql script using phoenix

Highlighted

Running sql script using phoenix

Rising Star

I want to drop few phoenix table in using a sqlline.py.

Can I write a drop_table.hql and exeucte in phoenix shell ?

2 REPLIES 2
Highlighted

Re: Running sql script using phoenix

Cloudera Employee

You should be able to drop table using phoenix sqlline. https://phoenix.apache.org/language/#drop_table

sqlline.py hostname.com /location/of/file/drop_table.sql
Highlighted

Re: Running sql script using phoenix

Super Collaborator

As @ssattiraju mentioned you may use a file with commands providing it as a command line parameter. One quick note - if one of the commands fail, the script will stop executing. To avoid it you may use just simple redirect like:

phoenix-sqlline localhost < file.sql
Don't have an account?
Coming from Hortonworks? Activate your account here