How to Upload a CSV file to Bigquery Table using the Web User Interface
You can directly load a CSV file from your Laptop / Desktop / GCS Bucket directly into a Bigquery table using the WebUI. Better yet, the process will automatically create the table as well
- Open the BigQuery web UI in the Cloud Console
- Choose the right project in the Resources dropdown present at the top header, then expand your Google Cloud project and click to select a dataset
- On the right side of the window, in the details panel, click Create table (or the Plus + symbol). The process for loading data is the same as the process for creating an empty table
- You will see a Popup page. On the Create table page
For Create table from, select Upload(NOTE: Choose Google Cloud Storage if your source file resides in GCS)
- Click on Browse and choose the file from your Laptop
Browse to the file, and click Open. Note that wildcards and comma-separated lists are not supported for local files
For File format, select CSV, JSON (newline delimited), Avro, Parquet, or ORC Scroll down to the Destination section:
For Dataset name, choose the appropriate datasetIn the Table name field, enter the name of the table you're creating in BigQuery
In the Schema section, enter the schema definition
For CSV and JSON files, you can check the Auto-detect option to enable schema auto-detect. Schema information is self-described in the source data for other supported file types
You can also enter schema information manually by: Clicking Edit as text and entering the table schema as a JSON array (or) Using Add Field to manually input the schema
Finally, Select the applicable items in the Advanced options section and then click Create Table
NOTE: If you choose Auto Detect, Bigquery will use the first row to read the column names and it will use the data to automatically determine the right datatypes. Any unsupported characters in the column names will be replaced with an underscore "_" while creating a table
nVector
posted on 12 Aug 20Enjoy great content like this and a lot more !
Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds
Post Comment