google-cloud-platformgoogle-bigquery

The values of a table are not pulled into the BigQuery


I have created a table in a BigQuery dataset and upload it from my files, however when checking the table I see a difference in values(see the images), in particular the following variables, TimeAct, TotalIntensity and AverageIntensity.

In the BigQuery table they have values 0 as oppose to the original dataset in Excel where their value is NOT 0.

Schema was auto-detected and I had 1 header row to skip. I made sure the columns are formated in the correct format. I tried different formats (left it as STRING)

Any ideas?

Thanks in advance.

[Original Dataset] enter image description here

[BigQuery Table] enter image description here


Solution

  • I tried to reproduce this error by taking a screenshot and convert to CSV. Then I go to BigQuery and create a table from an uploaded CSV file with auto-detect schema. I think I got an expected result below.

    Here are my suggestion:

    1. The BigQuery preview table is not sorted as the original file. From the screenshot, it could be a different part of data in your file which is not just 44 rows from what we've seen. Try query data first and make sure it's correct.
    2. You mentioned that you import from Excel file. Try converting it to CSV first, in case it is some formatting issue from Excel. I recommend using CSV as a source input file as it is easier to export from Excel.

    BigQuery Import from CSV