Load files into BigQuery tables
The second data operation of this tutorial will consist in loading the contents of our files into BigQuery tables.
📄 Create your configuration files
Create the JSON file for the data pipeline operation
{ "$schema": "http://jsonschema.tailer.ai/schema/storage-to-tables-veditor", "configuration_type": "storage-to-tables", "configuration_id": "000099-tailer-demo-load-files-YOUR-NAME", "version": "2", "environment": "DEV", "account": "000099", "activated": true, "archived": false, "short_description": "This data operation loads files into BigQuery tables.", "doc_md": "tailer-demo-stt.md", "source": { "type": "gcs", "gcp_project_id": "my-gcp-project", "gcs_source_bucket": "my-bucket", "gcs_source_prefix": "input-folder-YOUR-NAME", "gcs_archive_prefix": "archive-folder-YOUR-NAME", "gcp_credentials_secret": { "cipher_aes": "xxx", "ciphertext": "xxx", "enc_session_key": "xxx", "tag": "xxx" } }, "destinations": [ { "type": "bigquery", "gcp_project_id": "my-gcp-project", "gbq_dataset": "my_gbq_dataset_YOUR_NAME", "source_format": "CSV", "bq_load_job_ignore_unknown_values": true, "create_disposition": "CREATE_IF_NEEDED", "write_disposition": "WRITE_TRUNCATE", "skip_leading_rows": 1, "field_delimiter": "|", "gcp_credentials_secret": { "cipher_aes": "xxx", "ciphertext": "xxx", "enc_session_key": "xxx", "tag": "xxx" }, "tables": [ { "table_name": "stores", "short_description": "Store repository", "filename_template": "stores-{{FD_DATE}}-{{FD_TIME}}.csv", "ddl_file": "ddl/stores.json", "doc_md": "ddl/stores.md" }, { "table_name": "products", "short_description": "Product repository", "filename_template": "products-{{FD_DATE}}-{{FD_TIME}}.csv", "ddl_file": "ddl/products.json" }, { "table_name": "sales", "short_description": "Daily Iowa Liquor sales", "filename_template": "sales_{{FD_BLOB_8}}-{{FD_DATE}}.csv", "ddl_file": "ddl/sales.json" }, { "table_name": "sales_daily", "short_description": "Daily Iowa Liquor sales", "filename_template": "sales_{{FD_DATE}}.csv", "ddl_file": "ddl/sales_daily.json" } ] } ] }
Create the table schema files
▶️ Deploy the data operation
✅ Check the data operation in Tailer Studio
🗳️ Check the result in GCP
🚀 Further steps
Last updated