Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.57 KB

BigQuery_Create_table_from_csv.md

File metadata and controls

45 lines (27 loc) · 1.57 KB



Template request | Bug report | Generate Data Product

Tags: #bigquery #database #snippet #operations #dataframe

Author: Minura Punchihewa

Description: This notebook demonstrates how to create a BigQuery table from a CSV file.

Input

Import libraries

from naas_drivers import bigquery

Variable

service_account_file = "big-query-777777-ffffff777777.json"
project_id = "big-query-777777"
dataset = "example_ds"
table_name = "iris"
csv_file = "iris.csv"

Model

Connect to BigQuery

conn = bigquery.connect(service_account_file, project_id)

Output

Load data into the table

conn.load_data_from_csv(dataset, table_name, csv_file)