{"library":"apache-airflow-providers-google","code":"import os\nfrom datetime import datetime\n\nfrom airflow.models.dag import DAG\nfrom airflow.providers.google.cloud.operators.bigquery import BigQueryInsertJobOperator\n\n# Ensure you have a 'google_cloud_default' connection configured in Airflow.\n# This connection typically uses Application Default Credentials (ADC).\n# For local testing, ensure GOOGLE_APPLICATION_CREDENTIALS points to a service account key.\n\nwith DAG(\n    dag_id='gcp_bigquery_quickstart',\n    start_date=datetime(2023, 1, 1),\n    schedule_interval=None,\n    catchup=False,\n    tags=['gcp', 'bigquery', 'example'],\n) as dag:\n    insert_job = BigQueryInsertJobOperator(\n        task_id='insert_row_to_bigquery',\n        project_id=os.environ.get('GCP_PROJECT_ID', 'your-gcp-project-id'),\n        configuration={\n            'query': {\n                'query': 'INSERT INTO `dataset.table` (column1, column2) VALUES (\"value1\", \"value2\")',\n                'useLegacySql': False,\n                'destinationTable': {\n                    'projectId': os.environ.get('GCP_PROJECT_ID', 'your-gcp-project-id'),\n                    'datasetId': 'your_dataset_id',\n                    'tableId': 'your_table_id'\n                }\n            }\n        },\n        gcp_conn_id='google_cloud_default',\n    )\n","lang":"python","description":"This quickstart demonstrates a simple Airflow DAG using the `BigQueryInsertJobOperator` from the Google Cloud Provider. It assumes a 'google_cloud_default' Airflow connection is configured, typically leveraging Application Default Credentials (ADC) or a service account key file. Ensure the `GCP_PROJECT_ID` environment variable is set or replace 'your-gcp-project-id' with your actual GCP project ID, and similarly for dataset and table IDs.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":-1},{"runtime":"python:3.10-slim","exit_code":-1},{"runtime":"python:3.11-alpine","exit_code":-1},{"runtime":"python:3.11-slim","exit_code":-1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":-1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":-1},{"runtime":"python:3.9-alpine","exit_code":-1},{"runtime":"python:3.9-slim","exit_code":-1}]}