- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
beeline show tables?
- Labels:
-
Apache Hive
Created 11-03-2016 11:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1)what is the difference between these two commands?
To get table names in a database which one i need to use?
0: jdbc:hive2://> show tables; or
0: jdbc:hive2://> !tables
2)How to run HDFS ,Unix commands in beeline?
Created 11-03-2016 11:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) 'show tables;' is the standard SQL way of getting table names. '!tables' is specific to Beeline so use 'show tables;' to make sure your SQL is portable to other SQL clients.
2) Use '!sh <command>' to run shell command, e.g.
0: jdbc:hive2://hdp224.local:10000/default> !sh hdfs dfs -ls / Found 9 items drwxrwxrwx - yarn hadoop 0 2016-11-01 14:07 /app-logs drwxr-xr-x - hdfs hdfs 0 2016-11-01 12:41 /apps drwxr-xr-x - yarn hadoop 0 2016-11-01 15:55 /ats drwxr-xr-x - usera users 0 2016-11-01 14:29 /data drwxr-xr-x - hdfs hdfs 0 2016-11-01 12:38 /hdp drwxr-xr-x - mapred hdfs 0 2016-11-01 12:38 /mapred drwxrwxrwx - mapred hadoop 0 2016-11-01 12:38 /mr-history drwxrwxrwx - hdfs hdfs 0 2016-11-01 15:56 /tmp drwxr-xr-x - hdfs hdfs 0 2016-11-01 14:06 /user
Created 11-03-2016 11:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for quick response.
0: jdbc:hive2://hdp224.local:10000/default> !sh hdfs dfs -ls / is to run the HDFS commands
How to run Linux shell commands from beeline i mean how we will run below command in beeline
hive>!pwd;
Created 11-04-2016 12:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any Input on my clarifications.
Created 11-04-2016 02:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
'Hiển thị bảng;' is how to SQL tiêu chuẩn receive bảng tên. '! Bảng "is cụ thể cho Beeline to use 'bảng hiển thị;' to ensure SQL of you is xách tay cho all khách hàng khác SQL.
2) Use '! Sh <script> 'to run shell commands, for example like
- 0: jdbc: hive2: //hdp224.local:10000/default> sh HDFS dfs -ls /!
- Tìm thấy 9 mặt hàng
- drwxrwxrwx - sợi hadoop 0 năm 2016-11 - 01 14: 07 / ứng dụng - bản ghi
- drwxr - xr - x - HDFS HDFS 0 năm 2016-11 - 01 12: 41 / application
- drwxr - xr - x - sợi hadoop 0 năm 2016-11 - 01 15: 55 / ATS
- drwxr - xr - x - UserA người sử dụng 0 năm 2016-11 - 01 14: 29 / dữ liệu
- drwxr - xr - x - HDFS HDFS 0 năm 2016-11 - 01 12: 38 / HDP
- drwxr - xr - x - HDFS mapred 0 năm 2016-11 - 01 12: 38 / mapred
- drwxrwxrwx - mapred hadoop 0 năm 2016-11 - 01 12: 38 / mr - lịch sử
- drwxrwxrwx - HDFS HDFS 0 năm 2016-11 - 01 15: 56 / tmp
- drwxr - xr - x - HDFS HDFS 0 năm 2016-11 - 01 14: 06 / user ' Cảm ơn, may mắn thay tôi cũng muốn biết