Created 11-03-2016 11:16 AM
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
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
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
Any Input on my clarifications.
Created 11-04-2016 02:07 PM
'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