Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Running sql script using phoenix
Labels:
- Labels:
-
Apache HBase
-
Apache Phoenix
Expert Contributor
Created ‎08-29-2017 08:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Contributor
Created ‎08-29-2017 08:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Super Collaborator
Created ‎08-29-2017 06:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
