–Retail_stage DATABASE has table order_items with input format/output format as AVRO.
–Retail stage database has table orders with input/output format as text.
–Objective is to insert data into order_items table stored in retail_ods table
Command used-
INSERT OVERWRITE TABLE RETAIL_ODS.ORDER_ITEMS PARTITION(ORDER_MONTH)
> Select oi.order_item_order_id,oi.order_item_id,oi.order_item_product_id,oi.order_item_quantity,oi.order_item_subtotal,
> o.order_date, substr(order_date,1,7) order_month from retail_stage.order_items oi join retail_stage.orders o on oi.order_item_order_id=o.order_id;
Error-
java.io.IOException: java.lang.reflect.InvocationTargetException
java.io.IOException:Not a data file
Query is related to the last video of the “Creating tables is hive/impala”