Saving all output to "!!{outputDirectory}!!/lineage1.q.raw". Enter "record" with no arguments to stop it. >>> !run !!{qFileDirectory}!!/lineage1.q >>> >>> >>> CREATE TABLE dest_l1(key INT, value STRING) STORED AS TEXTFILE; No rows affected >>> >>> >>> EXPLAIN INSERT OVERWRITE TABLE dest_l1 SELECT j.* FROM (SELECT t1.key, p1.value FROM src1 t1 LEFT OUTER JOIN src p1 ON (t1.key = p1.key) UNION ALL SELECT t2.key, p2.value FROM src1 t2 LEFT OUTER JOIN src p2 ON (t2.key = p2.key)) j; 'Explain' 'ABSTRACT SYNTAX TREE:' ' (TOK_QUERY (TOK_FROM (TOK_SUBQUERY (TOK_UNION (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src1) t1) (TOK_TABREF (TOK_TABNAME src) p1) (= (. (TOK_TABLE_OR_COL t1) key) (. (TOK_TABLE_OR_COL p1) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL t1) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL p1) value))))) (TOK_QUERY (TOK_FROM (TOK_LEFTOUTERJOIN (TOK_TABREF (TOK_TABNAME src1) t2) (TOK_TABREF (TOK_TABNAME src) p2) (= (. (TOK_TABLE_OR_COL t2) key) (. (TOK_TABLE_OR_COL p2) key)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL t2) key)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL p2) value)))))) j)) (TOK_INSERT (TOK_DESTINATION (TOK_TAB (TOK_TABNAME dest_l1))) (TOK_SELECT (TOK_SELEXPR (TOK_ALLCOLREF (TOK_TABNAME j))))))' '' 'STAGE DEPENDENCIES:' ' Stage-1 is a root stage' ' Stage-2 depends on stages: Stage-1, Stage-9' ' 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-9 is a root stage' '' 'STAGE PLANS:' ' Stage: Stage-1' ' Map Reduce' ' Alias -> Map Operator Tree:' ' null-subquery1:j-subquery1:p1 ' ' TableScan' ' alias: p1' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 1' ' value expressions:' ' expr: value' ' type: string' ' null-subquery1:j-subquery1:t1 ' ' TableScan' ' alias: t1' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 0' ' value expressions:' ' expr: key' ' type: string' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Left Outer Join0 to 1' ' condition expressions:' ' 0 {VALUE._col0}' ' 1 {VALUE._col1}' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col5' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col5' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.SequenceFileInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat' '' ' Stage: Stage-2' ' Map Reduce' ' Alias -> Map Operator Tree:' ' file:!!{hive.exec.scratchdir}!! ' ' TableScan' ' Union' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: lineage1.dest_l1' ' file:!!{hive.exec.scratchdir}!! ' ' TableScan' ' Union' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' Select Operator' ' expressions:' ' expr: UDFToInteger(_col0)' ' type: int' ' expr: _col1' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 1' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: lineage1.dest_l1' '' ' Stage: Stage-8' ' Conditional Operator' '' ' Stage: Stage-5' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-0' ' Move Operator' ' tables:' ' replace: true' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: lineage1.dest_l1' '' ' Stage: Stage-3' ' Stats-Aggr Operator' '' ' Stage: Stage-4' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: lineage1.dest_l1' '' ' Stage: Stage-6' ' Map Reduce' ' Alias -> Map Operator Tree:' ' pfile:!!{hive.exec.scratchdir}!! ' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.TextInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ' serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' ' name: lineage1.dest_l1' '' ' Stage: Stage-7' ' Move Operator' ' files:' ' hdfs directory: true' ' destination: pfile:!!{hive.exec.scratchdir}!!' '' ' Stage: Stage-9' ' Map Reduce' ' Alias -> Map Operator Tree:' ' null-subquery2:j-subquery2:p2 ' ' TableScan' ' alias: p2' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 1' ' value expressions:' ' expr: value' ' type: string' ' null-subquery2:j-subquery2:t2 ' ' TableScan' ' alias: t2' ' Reduce Output Operator' ' key expressions:' ' expr: key' ' type: string' ' sort order: +' ' Map-reduce partition columns:' ' expr: key' ' type: string' ' tag: 0' ' value expressions:' ' expr: key' ' type: string' ' Reduce Operator Tree:' ' Join Operator' ' condition map:' ' Left Outer Join0 to 1' ' condition expressions:' ' 0 {VALUE._col0}' ' 1 {VALUE._col1}' ' handleSkewJoin: false' ' outputColumnNames: _col0, _col5' ' Select Operator' ' expressions:' ' expr: _col0' ' type: string' ' expr: _col5' ' type: string' ' outputColumnNames: _col0, _col1' ' File Output Operator' ' compressed: false' ' GlobalTableId: 0' ' table:' ' input format: org.apache.hadoop.mapred.SequenceFileInputFormat' ' output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat' '' '' 237 rows selected >>> >>> INSERT OVERWRITE TABLE dest_l1 SELECT j.* FROM (SELECT t1.key, p1.value FROM src1 t1 LEFT OUTER JOIN src p1 ON (t1.key = p1.key) UNION ALL SELECT t2.key, p2.value FROM src1 t2 LEFT OUTER JOIN src p2 ON (t2.key = p2.key)) j; '_col0','_col1' No rows selected >>> >>> !record