BigQuery load CSV file 'successful' althou

2019-08-14 07:27发布

问题:

I am trying to upload a CSV to a preexisting table in Google BigQuery although the table is not updating. It says the job loads 'successfully' and I have no errors. Except when I go into check the table, it doesnt add in the lines of the newly 'added' CSV.

I have the setting 'append to table' although it is not appending to table.

Things that I have tried include: copying the table with a similar name to be able to have selected 'over write table'/''write if empty' even though i know this isn't what I want, i have increased 'Number of errors allowed' even though there are no errors, enabled 'Allow quoted newlines', 'Allow jagged rows' and 'Ignore unknown values' together and separatedly, recreated the table with auto detect schema, manually created the schema, set all of the value of entries in the schema to STRING, set all of the values to data types that they should be where applicable.I have changed the delimiter only to find out that the values are separated by commas (who would have guessed!) alothough i noticed when i changed the delimiter it actually would add the lines into the table.I opened the CSV file using Numbers and then exported it once again as a CSV file.

I am running out of ideas of different things I can try.If anyone knows what might help me or if i have left any details out please let me know.

I deeply apologize if this is more of a question for a different SlackExchange site, or if this is just a stupid question.

Thanks all!

Edit 2018/03/19 : Results from job load:

Job Load Successful
Job ID  fire2018dgk:EU.bquijob_836dd47_1622f49b68e
Creation Time   Mar 16, 2018, 3:49:53 PM
Start Time  Mar 16, 2018, 3:49:55 PM
End Time    Mar 16, 2018, 3:49:57 PM
User    fire2018@fog.com
Destination Table   firefog:data-warehouse.dgk
Write Preference    Append to table
Source Format   CSV
Delimiter   ,
Skip Leading Rows   1
Allow Quoted Newlines   true
Allow Jagged Rows   true
Source URI  uploaded file
Schema  
id: STRING
timestamp: STRING
abandonned: STRING
campaign_type: STRING
campaign: STRING
call_type: STRING
holds: STRING
hold_time: STRING
call_time: STRING
talk_time: STRING
agents_email: STRING
priority: STRING
phone_number: STRING
date: STRING
day_of_week: STRING
time_of_call: STRING

Update 2018/03/19: This problem I am having is not limited to just this table , I also have this problem with another table in the database but the strange thing here is I am using a previous job load that I know works from a number of other past uploads I have done using the same job load.

回答1:

I have never used BigQuery and this is just my wild guess. The order of your columns in the csv file doesn't match that of your tables. In mysql there is a command "describe table_name" where you could see the order of the columns in your table.

The other thing is make sure you don't have foreignkey to a table that it doesn't exist.

Long story short, order of your csv columns and uploading csv files matter.

Again, I just wasted 3 days on this problem with mysql, I thought to share my input.