[ https://issues.apache.org/jira/browse/AIRFLOW-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361850#comment-16361850 ]
Kaxil Naik commented on AIRFLOW-1503: ------------------------------------- [~maximilianr] Have you created a service account? Once you do that you need to create a connection for Airflow to interact with GCP service. Check out example over here: https://github.com/alexvanboxel/airflow-gcp-examples . Once you create a connection then you need to pass that connection name to `bigquery_conn_id` parameter in BigQuery Operator. > AssertionError: INTERNAL: No default project is specified > --------------------------------------------------------- > > Key: AIRFLOW-1503 > URL: https://issues.apache.org/jira/browse/AIRFLOW-1503 > Project: Apache Airflow > Issue Type: Bug > Components: gcp > Affects Versions: Airflow 1.8 > Environment: Unix platform > Reporter: chaitanya > Priority: Minor > Labels: beginner > > Hi , > New to airflow. Tried to run BigQuery query and store the result in another > table. Getting the following error. > Please let me know where to default project. > Code: > sql_bigquery = BigQueryOperator( > task_id='sql_bigquery', > use_legacy_sql=False, > write_disposition='WRITE_TRUNCATE', > allow_large_results=True, > bql=''' > #standardSQL > SELECT ID, Name, Group, Mark, RATIO_TO_REPORT(Mark) > OVER(PARTITION BY Group) AS percent FROM `tensile-site-168620.temp.marks` > ''', > destination_dataset_table='temp.percentage', > dag=dag > ) > Error Message: > Traceback (most recent call last): > File "/usr/local/bin/airflow", line 28, in <module> > args.func(args) > File "/usr/local/lib/python2.7/dist-packages/airflow/bin/cli.py", line 585, > in test > ti.run(ignore_task_deps=True, ignore_ti_state=True, test_mode=True) > File "/usr/local/lib/python2.7/dist-packages/airflow/utils/db.py", line 53, > in wrapper > result = func(*args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 1374, > in run > result = task_copy.execute(context=context) > File > "/usr/local/lib/python2.7/dist-packages/airflow/contrib/operators/bigquery_operator.py", > line 82, in execute > self.allow_large_results, self.udf_config, self.use_legacy_sql) > File > "/usr/local/lib/python2.7/dist-packages/airflow/contrib/hooks/bigquery_hook.py", > line 228, in run_query > default_project_id=self.project_id) > File > "/usr/local/lib/python2.7/dist-packages/airflow/contrib/hooks/bigquery_hook.py", > line 917, in _split_tablename > assert default_project_id is not None, "INTERNAL: No default project is > specified" > AssertionError: INTERNAL: No default project is specified -- This message was sent by Atlassian JIRA (v7.6.3#76005)