Saving all output to "!!{outputDirectory}!!/input_part2.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/input_part2.q >>> CREATE TABLE dest1(key INT, value STRING, hr STRING, ds STRING) STORED AS TEXTFILE; No rows affected >>> CREATE TABLE dest2(key INT, value STRING, hr STRING, ds STRING) STORED AS TEXTFILE; No rows affected >>> >>> EXPLAIN EXTENDED FROM srcpart INSERT OVERWRITE TABLE dest1 SELECT srcpart.key, srcpart.value, srcpart.hr, srcpart.ds WHERE srcpart.key < 100 and srcpart.ds = '2008-04-08' and srcpart.hr = '12' INSERT OVERWRITE TABLE dest2 SELECT srcpart.key, srcpart.value, srcpart.hr, srcpart.ds WHERE srcpart.key < 100 and srcpart.ds = '2008-04-09' and srcpart.hr = '12'; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_TABREF (TOK_TABNAME srcpart))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest1))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) hr)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) ds))) (TOK_WHERE (and (and (< (. (TOK_TABLE_OR_COL srcpart) key) 100) (= (. (TOK_TABLE_OR_COL srcpart) ds) '2008-04-08')) (= (. (TOK_TABLE_OR_COL srcpart) hr) '12')))) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest2))) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) value)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) hr)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL srcpart) ds))) (TOK_WHERE (and (and (< (. (TOK_TABLE_OR_COL srcpart) key) 100) (= (. (TOK_TABLE_OR_COL srcpart) ds) '2008-04-09')) (= (. (TOK_TABLE_OR_COL srcpart) hr) '12')))))' '' 'STAGE DEPENDENCIES:' ' Stage-2 is a root stage' ' Stage-8 depends on stages: Stage-2 , consists of Stage-5, Stage-4, Stage-6' ' Stage-5' ' Stage-0 depends on stages: Stage-5, Stage-4, Stage-7' ' Stage-3 depends on stages: Stage-0' ' Stage-4' ' Stage-6' ' Stage-7 depends on stages: Stage-6' ' Stage-14 depends on stages: Stage-2 , consists of Stage-11, Stage-10, Stage-12' ' Stage-11' ' Stage-1 depends on stages: Stage-11, Stage-10, Stage-13' ' Stage-9 depends on stages: Stage-1' ' Stage-10' ' Stage-12' ' Stage-13 depends on stages: Stage-12' '' 'STAGE PLANS:' ' Stage: Stage-2' ' Map Reduce' ' Alias -> Map Operator Tree:' ' srcpart ' ' TableScan' ' alias: srcpart' ' GatherStats: false' ' Filter Operator' ' isSamplingPred: false' ' predicate:' ' expr: ((key < 100.0) and (ds = '2008-04-08'))' ' type: boolean' ' Select Operator' ' expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' expr: hr' ' type: string' ' expr: ds' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' expr: _col2' ' type: string' ' expr: _col3' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3' ' File Output Operator' ' compressed: false' ' GlobalTableId: 1' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' Stats Publishing Key Prefix: pfile:!!{hive.exec.scratchdir}!!' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest1' ' TotalFiles: 1' ' GatherStats: true' ' MultiFileSpray: false' ' Filter Operator' ' isSamplingPred: false' ' predicate:' ' expr: ((key < 100.0) and (ds = '2008-04-09'))' ' type: boolean' ' Select Operator' ' expressions:' ' expr: key' ' type: string' ' expr: value' ' type: string' ' expr: hr' ' type: string' ' expr: ds' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' expr: _col2' ' type: string' ' expr: _col3' ' type: string' ' outputColumnNames: _col0, _col1, _col2, _col3' ' File Output Operator' ' compressed: false' ' GlobalTableId: 2' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' Stats Publishing Key Prefix: pfile:!!{hive.exec.scratchdir}!!' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest2' ' TotalFiles: 1' ' GatherStats: true' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart/ds=2008-04-08/hr=12 [srcpart]' ' !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart/ds=2008-04-09/hr=12 [srcpart]' ' Path -> Partition:' ' !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart/ds=2008-04-08/hr=12 ' ' Partition' ' base file name: hr=12' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' partition values:' ' ds 2008-04-08' ' hr 12' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart/ds=2008-04-08/hr=12' ' name input_part2.srcpart' ' numFiles 1' ' numPartitions 4' ' numRows 0' ' partition_columns ds/hr' ' rawDataSize 0' ' serialization.ddl struct srcpart { string key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 5812' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart' ' name input_part2.srcpart' ' numFiles 4' ' numPartitions 4' ' numRows 0' ' partition_columns ds/hr' ' rawDataSize 0' ' serialization.ddl struct srcpart { string key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 23248' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.srcpart' ' name: input_part2.srcpart' ' !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart/ds=2008-04-09/hr=12 ' ' Partition' ' base file name: hr=12' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' partition values:' ' ds 2008-04-09' ' hr 12' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart/ds=2008-04-09/hr=12' ' name input_part2.srcpart' ' numFiles 1' ' numPartitions 4' ' numRows 0' ' partition_columns ds/hr' ' rawDataSize 0' ' serialization.ddl struct srcpart { string key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 5812' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value' ' columns.types string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/srcpart' ' name input_part2.srcpart' ' numFiles 4' ' numPartitions 4' ' numRows 0' ' partition_columns ds/hr' ' rawDataSize 0' ' serialization.ddl struct srcpart { string key, string value}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' totalSize 23248' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.srcpart' ' name: input_part2.srcpart' '' ' Stage: Stage-8' ' Conditional Operator' '' ' Stage: Stage-5' ' Move Operator' ' files:' ' hdfs directory: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-0' ' Move Operator' ' tables:' ' replace: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest1' ' tmp directory: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-3' ' Stats-Aggr Operator' ' Stats Aggregation Key Prefix: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-4' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest1' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]' ' Path -> Partition:' ' pfile:!!{hive.exec.scratchdir}!! ' ' Partition' ' base file name: -ext-10004' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest1' ' name: input_part2.dest1' '' ' Stage: Stage-6' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest1' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]' ' Path -> Partition:' ' pfile:!!{hive.exec.scratchdir}!! ' ' Partition' ' base file name: -ext-10004' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest1' ' name input_part2.dest1' ' serialization.ddl struct dest1 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest1' ' name: input_part2.dest1' '' ' Stage: Stage-7' ' Move Operator' ' files:' ' hdfs directory: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-14' ' Conditional Operator' '' ' Stage: Stage-11' ' Move Operator' ' files:' ' hdfs directory: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-1' ' Move Operator' ' tables:' ' replace: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest2' ' tmp directory: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-9' ' Stats-Aggr Operator' ' Stats Aggregation Key Prefix: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-10' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest2' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]' ' Path -> Partition:' ' pfile:!!{hive.exec.scratchdir}!! ' ' Partition' ' base file name: -ext-10005' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest2' ' name: input_part2.dest2' '' ' Stage: Stage-12' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' directory: pfile:!!{hive.exec.scratchdir}!!' ' NumFilesPerFileSink: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest2' ' TotalFiles: 1' ' GatherStats: false' ' MultiFileSpray: false' ' Needs Tagging: false' ' Path -> Alias:' ' pfile:!!{hive.exec.scratchdir}!! [pfile:!!{hive.exec.scratchdir}!!]' ' Path -> Partition:' ' pfile:!!{hive.exec.scratchdir}!! ' ' Partition' ' base file name: -ext-10005' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' ' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' properties:' ' bucket_count -1' ' columns key,value,hr,ds' ' columns.types int:string:string:string' ' file.inputformat org.apache.hadoop.mapred.TextInputFormat' ' file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' location !!{hive.metastore.warehouse.dir}!!/input_part2.db/dest2' ' name input_part2.dest2' ' serialization.ddl struct dest2 { i32 key, string value, string hr, string ds}' ' serialization.format 1' ' serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' transient_lastDdlTime !!UNIXTIME!!' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: input_part2.dest2' ' name: input_part2.dest2' '' ' Stage: Stage-13' ' Move Operator' ' files:' ' hdfs directory: true' ' source: pfile:!!{hive.exec.scratchdir}!!' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' '' 613 rows selected >>> >>> FROM srcpart INSERT OVERWRITE TABLE dest1 SELECT srcpart.key, srcpart.value, srcpart.hr, srcpart.ds WHERE srcpart.key < 100 and srcpart.ds = '2008-04-08' and srcpart.hr = '12' INSERT OVERWRITE TABLE dest2 SELECT srcpart.key, srcpart.value, srcpart.hr, srcpart.ds WHERE srcpart.key < 100 and srcpart.ds = '2008-04-09' and srcpart.hr = '12'; '_col0','_col1','_col2','_col3' No rows selected >>> >>> SELECT dest1.* FROM dest1 sort by key,value,ds,hr; 'key','value','hr','ds' '0','val_0','12','2008-04-08' '0','val_0','12','2008-04-08' '0','val_0','12','2008-04-08' '2','val_2','12','2008-04-08' '4','val_4','12','2008-04-08' '5','val_5','12','2008-04-08' '5','val_5','12','2008-04-08' '5','val_5','12','2008-04-08' '8','val_8','12','2008-04-08' '9','val_9','12','2008-04-08' '10','val_10','12','2008-04-08' '11','val_11','12','2008-04-08' '12','val_12','12','2008-04-08' '12','val_12','12','2008-04-08' '15','val_15','12','2008-04-08' '15','val_15','12','2008-04-08' '17','val_17','12','2008-04-08' '18','val_18','12','2008-04-08' '18','val_18','12','2008-04-08' '19','val_19','12','2008-04-08' '20','val_20','12','2008-04-08' '24','val_24','12','2008-04-08' '24','val_24','12','2008-04-08' '26','val_26','12','2008-04-08' '26','val_26','12','2008-04-08' '27','val_27','12','2008-04-08' '28','val_28','12','2008-04-08' '30','val_30','12','2008-04-08' '33','val_33','12','2008-04-08' '34','val_34','12','2008-04-08' '35','val_35','12','2008-04-08' '35','val_35','12','2008-04-08' '35','val_35','12','2008-04-08' '37','val_37','12','2008-04-08' '37','val_37','12','2008-04-08' '41','val_41','12','2008-04-08' '42','val_42','12','2008-04-08' '42','val_42','12','2008-04-08' '43','val_43','12','2008-04-08' '44','val_44','12','2008-04-08' '47','val_47','12','2008-04-08' '51','val_51','12','2008-04-08' '51','val_51','12','2008-04-08' '53','val_53','12','2008-04-08' '54','val_54','12','2008-04-08' '57','val_57','12','2008-04-08' '58','val_58','12','2008-04-08' '58','val_58','12','2008-04-08' '64','val_64','12','2008-04-08' '65','val_65','12','2008-04-08' '66','val_66','12','2008-04-08' '67','val_67','12','2008-04-08' '67','val_67','12','2008-04-08' '69','val_69','12','2008-04-08' '70','val_70','12','2008-04-08' '70','val_70','12','2008-04-08' '70','val_70','12','2008-04-08' '72','val_72','12','2008-04-08' '72','val_72','12','2008-04-08' '74','val_74','12','2008-04-08' '76','val_76','12','2008-04-08' '76','val_76','12','2008-04-08' '77','val_77','12','2008-04-08' '78','val_78','12','2008-04-08' '80','val_80','12','2008-04-08' '82','val_82','12','2008-04-08' '83','val_83','12','2008-04-08' '83','val_83','12','2008-04-08' '84','val_84','12','2008-04-08' '84','val_84','12','2008-04-08' '85','val_85','12','2008-04-08' '86','val_86','12','2008-04-08' '87','val_87','12','2008-04-08' '90','val_90','12','2008-04-08' '90','val_90','12','2008-04-08' '90','val_90','12','2008-04-08' '92','val_92','12','2008-04-08' '95','val_95','12','2008-04-08' '95','val_95','12','2008-04-08' '96','val_96','12','2008-04-08' '97','val_97','12','2008-04-08' '97','val_97','12','2008-04-08' '98','val_98','12','2008-04-08' '98','val_98','12','2008-04-08' 84 rows selected >>> SELECT dest2.* FROM dest2 sort by key,value,ds,hr; 'key','value','hr','ds' '0','val_0','12','2008-04-09' '0','val_0','12','2008-04-09' '0','val_0','12','2008-04-09' '2','val_2','12','2008-04-09' '4','val_4','12','2008-04-09' '5','val_5','12','2008-04-09' '5','val_5','12','2008-04-09' '5','val_5','12','2008-04-09' '8','val_8','12','2008-04-09' '9','val_9','12','2008-04-09' '10','val_10','12','2008-04-09' '11','val_11','12','2008-04-09' '12','val_12','12','2008-04-09' '12','val_12','12','2008-04-09' '15','val_15','12','2008-04-09' '15','val_15','12','2008-04-09' '17','val_17','12','2008-04-09' '18','val_18','12','2008-04-09' '18','val_18','12','2008-04-09' '19','val_19','12','2008-04-09' '20','val_20','12','2008-04-09' '24','val_24','12','2008-04-09' '24','val_24','12','2008-04-09' '26','val_26','12','2008-04-09' '26','val_26','12','2008-04-09' '27','val_27','12','2008-04-09' '28','val_28','12','2008-04-09' '30','val_30','12','2008-04-09' '33','val_33','12','2008-04-09' '34','val_34','12','2008-04-09' '35','val_35','12','2008-04-09' '35','val_35','12','2008-04-09' '35','val_35','12','2008-04-09' '37','val_37','12','2008-04-09' '37','val_37','12','2008-04-09' '41','val_41','12','2008-04-09' '42','val_42','12','2008-04-09' '42','val_42','12','2008-04-09' '43','val_43','12','2008-04-09' '44','val_44','12','2008-04-09' '47','val_47','12','2008-04-09' '51','val_51','12','2008-04-09' '51','val_51','12','2008-04-09' '53','val_53','12','2008-04-09' '54','val_54','12','2008-04-09' '57','val_57','12','2008-04-09' '58','val_58','12','2008-04-09' '58','val_58','12','2008-04-09' '64','val_64','12','2008-04-09' '65','val_65','12','2008-04-09' '66','val_66','12','2008-04-09' '67','val_67','12','2008-04-09' '67','val_67','12','2008-04-09' '69','val_69','12','2008-04-09' '70','val_70','12','2008-04-09' '70','val_70','12','2008-04-09' '70','val_70','12','2008-04-09' '72','val_72','12','2008-04-09' '72','val_72','12','2008-04-09' '74','val_74','12','2008-04-09' '76','val_76','12','2008-04-09' '76','val_76','12','2008-04-09' '77','val_77','12','2008-04-09' '78','val_78','12','2008-04-09' '80','val_80','12','2008-04-09' '82','val_82','12','2008-04-09' '83','val_83','12','2008-04-09' '83','val_83','12','2008-04-09' '84','val_84','12','2008-04-09' '84','val_84','12','2008-04-09' '85','val_85','12','2008-04-09' '86','val_86','12','2008-04-09' '87','val_87','12','2008-04-09' '90','val_90','12','2008-04-09' '90','val_90','12','2008-04-09' '90','val_90','12','2008-04-09' '92','val_92','12','2008-04-09' '95','val_95','12','2008-04-09' '95','val_95','12','2008-04-09' '96','val_96','12','2008-04-09' '97','val_97','12','2008-04-09' '97','val_97','12','2008-04-09' '98','val_98','12','2008-04-09' '98','val_98','12','2008-04-09' 84 rows selected >>> >>> >>> !record