admin管理员组

文章数量:1122846

I have a database that I'm trying to move over from SQL Server to BigQuery. In this database I have 286 tables and I'm trying to figure out the best way to get them all uploaded in one go. Is this possible or do I have to create one table at a time? I have scripted all 286 tables into one file but I'm thinking I may have to do each one individually if creating multiple tables at once isn't possible.

We also use a bucket where we send the files to so maybe that can be another route to get these tables created. I can upload them to our bucket and then when creating the table it asks where to create from and I can select Google Cloud Storage. What would be the best route to go for what I'm trying to achieve? Thank you in advance for helping someone newer to BigQuery out!

Edit: Something else I was thinking is I can make the tables into CSV and upload them but the issue I was having with that was the syntax. BigQuery doesn't like SQL Server Syntax and would give me a ton of errors So I'm manually having to create the schemas.

I haven't tested anything yet, getting feedback for the best route to use or suggestions.

I have a database that I'm trying to move over from SQL Server to BigQuery. In this database I have 286 tables and I'm trying to figure out the best way to get them all uploaded in one go. Is this possible or do I have to create one table at a time? I have scripted all 286 tables into one file but I'm thinking I may have to do each one individually if creating multiple tables at once isn't possible.

We also use a bucket where we send the files to so maybe that can be another route to get these tables created. I can upload them to our bucket and then when creating the table it asks where to create from and I can select Google Cloud Storage. What would be the best route to go for what I'm trying to achieve? Thank you in advance for helping someone newer to BigQuery out!

Edit: Something else I was thinking is I can make the tables into CSV and upload them but the issue I was having with that was the syntax. BigQuery doesn't like SQL Server Syntax and would give me a ton of errors So I'm manually having to create the schemas.

I haven't tested anything yet, getting feedback for the best route to use or suggestions.

Share Improve this question edited Nov 22, 2024 at 18:05 david madrid asked Nov 22, 2024 at 16:42 david madriddavid madrid 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

Option 1: Using the BigQuery Console Navigate to BigQuery Console: Go to the BigQuery Console.

Create a Dataset (if not already created):

Click + Create Dataset in the left panel. Enter a dataset name, data location, and optional expiration date, then click Create. Create Tables:

Within the dataset, click + Create Table. Choose the Source: Empty Table: Create a table from scratch. Upload or Google Cloud Storage: Create a table based on imported data. Define the schema for the table by adding fields (columns). Click Create Table. Repeat this step to create additional tables.

本文标签: sqlCreating Multiple Tables in BigQueryStack Overflow