Suppose I am having a source Avro table having 10 columns and my target Avro table is having 12 columns, while inserting data into the target table I need to add null values to the extra 2 columns.
But when I execute the below query it has thrown the exception
AnalysisException: Target table 'target_table' has more columns (8) than the SELECT / VALUES clause returns (7)
insert overwrite table target_table select * from source_table;
How to make advantage of Avro table automatic schema change detection here?
Note: Suppose if I want to insert only 5 columns to the target and the rest should be default null. So how to achieve this?