BigQuery mismatch columns

513 Views Asked by At

I have multiple in .CSV files in Google cloud storage but I am unable to push data into table because number of columns in .CSV files are different.

Let's say I have 10 .CSV files with columns A, B, C, D, and I have another 10 .CSV files with columns A, B, D.

When I push .CSV files into Big Query table, I want to create to A column to A , B column To B, C column to C and making NULL for other 10 .CSV, D column to D .

Lets Suppose 10 .CSV files have column :

NAME,   DOB,         GENDER, MOBILE NO.
Dan ,   12/08/1999,  MALE,  1234567889
Oliver, 17/03/19998, MALE,  5267382736

Another 10 .CSV file have column :

NAME,   DOB,         MOBILE NO.
Akash,  12/02/1999,  1234567889
Ram,    17/09/19998, 5267382736

But In Big Query Table Final result i want:

NAME,   DOB,         GENDER, MOBILE NO.
Dan ,   12/08/1999,  MALE,  1234567889
Oliver, 17/03/19998, MALE,  5267382736
Akash,  12/02/1999,         1234567889
Ram,    17/09/19998,        5267382736

Can anyone help me with this?

0

There are 0 best solutions below