hiveql

Is it possible to stop HIVE from printing the database when printing column headers using hive -e 'select'?

自古美人都是妖i 提交于 2020-03-19 06:40:11
问题 When performing: hive -e 'select * from database.table' > /localfilesystem/mytable.txt the column header names are in the form database.columnname and I would like them to be columnname only. Is there a way to supress the database in the columnname when performing the above type of query? 回答1: hive.resultset.use.unique.column.names was added in 0.13 and defaults to True . Just set it to false in your ~/.hiverc or in hive-site.xml <property> <name>hive.resultset.use.unique.column.names</name>

Hive dynamic partitioning

我的梦境 提交于 2020-03-13 04:25:56
问题 I'm trying to create a partitioned table using dynamic partitioning, but i'm facing an issue. I'm running Hive 0.12 on Hortonworks Sandbox 2.0. set hive.exec.dynamic.partition=true; INSERT OVERWRITE TABLE demo_tab PARTITION (land) SELECT stadt, geograph_breite, id, t.country FROM demo_stg t; however it does not work.. I'm getting an Error. Here is the Query to create the table demo_stg : create table demo_stg ( country STRING, stadt STRING, geograph_breite FLOAT, id INT ) ROW FORMAT DELIMITED

Hive dynamic partitioning

ⅰ亾dé卋堺 提交于 2020-03-13 04:24:28
问题 I'm trying to create a partitioned table using dynamic partitioning, but i'm facing an issue. I'm running Hive 0.12 on Hortonworks Sandbox 2.0. set hive.exec.dynamic.partition=true; INSERT OVERWRITE TABLE demo_tab PARTITION (land) SELECT stadt, geograph_breite, id, t.country FROM demo_stg t; however it does not work.. I'm getting an Error. Here is the Query to create the table demo_stg : create table demo_stg ( country STRING, stadt STRING, geograph_breite FLOAT, id INT ) ROW FORMAT DELIMITED

Hive dynamic partitioning

ぐ巨炮叔叔 提交于 2020-03-13 04:24:04
问题 I'm trying to create a partitioned table using dynamic partitioning, but i'm facing an issue. I'm running Hive 0.12 on Hortonworks Sandbox 2.0. set hive.exec.dynamic.partition=true; INSERT OVERWRITE TABLE demo_tab PARTITION (land) SELECT stadt, geograph_breite, id, t.country FROM demo_stg t; however it does not work.. I'm getting an Error. Here is the Query to create the table demo_stg : create table demo_stg ( country STRING, stadt STRING, geograph_breite FLOAT, id INT ) ROW FORMAT DELIMITED

Is there a way to prevent a Hive table from being overwritten if the SELECT query of the INSERT OVERWRITE does not return any results

爱⌒轻易说出口 提交于 2020-02-21 04:29:15
问题 I am developing a batch job that loads data into Hive tables from HDFS files. The flow of data is as follows Read the file received in HDFS using an external Hive table INSERT OVERWRITE the final hive table from the external Hive table applying certain transformations Move the received file to Archive This flow works fine if there is a file in the input directory for the external table to read during step 1. If there is no file, the external table will be empty and as a result executing step

Is there a way to prevent a Hive table from being overwritten if the SELECT query of the INSERT OVERWRITE does not return any results

我只是一个虾纸丫 提交于 2020-02-21 04:27:51
问题 I am developing a batch job that loads data into Hive tables from HDFS files. The flow of data is as follows Read the file received in HDFS using an external Hive table INSERT OVERWRITE the final hive table from the external Hive table applying certain transformations Move the received file to Archive This flow works fine if there is a file in the input directory for the external table to read during step 1. If there is no file, the external table will be empty and as a result executing step

Is there a way to prevent a Hive table from being overwritten if the SELECT query of the INSERT OVERWRITE does not return any results

若如初见. 提交于 2020-02-21 04:27:12
问题 I am developing a batch job that loads data into Hive tables from HDFS files. The flow of data is as follows Read the file received in HDFS using an external Hive table INSERT OVERWRITE the final hive table from the external Hive table applying certain transformations Move the received file to Archive This flow works fine if there is a file in the input directory for the external table to read during step 1. If there is no file, the external table will be empty and as a result executing step

Custom Mapper and Reducer vs HiveQL

瘦欲@ 提交于 2020-02-16 06:18:57
问题 Problem Statement:- I need to compare two tables Table1 and Table2 and they both store same thing. So I need to compare Table2 with Table1 as Table1 is the main table through which comparisons need to be made. So after comparing I need to make a report that Table2 has some sort of discrepancy. And these two tables has lots of data, around TB of data. So currently I have written HiveQL to do the comparisons and get the data back. So my question is which is better in terms of PERFORMANCE ,

Custom Mapper and Reducer vs HiveQL

╄→гoц情女王★ 提交于 2020-02-16 06:16:22
问题 Problem Statement:- I need to compare two tables Table1 and Table2 and they both store same thing. So I need to compare Table2 with Table1 as Table1 is the main table through which comparisons need to be made. So after comparing I need to make a report that Table2 has some sort of discrepancy. And these two tables has lots of data, around TB of data. So currently I have written HiveQL to do the comparisons and get the data back. So my question is which is better in terms of PERFORMANCE ,

Custom Mapper and Reducer vs HiveQL

ぐ巨炮叔叔 提交于 2020-02-16 06:16:11
问题 Problem Statement:- I need to compare two tables Table1 and Table2 and they both store same thing. So I need to compare Table2 with Table1 as Table1 is the main table through which comparisons need to be made. So after comparing I need to make a report that Table2 has some sort of discrepancy. And these two tables has lots of data, around TB of data. So currently I have written HiveQL to do the comparisons and get the data back. So my question is which is better in terms of PERFORMANCE ,