Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
aa71349
added warning message for deprecated project_id field in BigQueryGetD…
KamranImaaz Dec 28, 2025
0f3e111
updated the deprecated code with standard format
KamranImaaz Dec 28, 2025
2330f1e
updated google provider bigquery document regarding deprecation
KamranImaaz Dec 28, 2025
3caba58
created a seperate method to assign table_project_id using a deprecat…
KamranImaaz Dec 29, 2025
b229647
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Dec 29, 2025
9ef0769
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Dec 29, 2025
575bfda
Fix formatting issues found by prek hooks
KamranImaaz Dec 30, 2025
3a414a5
Merge remote-tracking branch 'upstream/main' into add-project_id-depr…
KamranImaaz Dec 30, 2025
2d74887
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Dec 30, 2025
8a5b72c
Merge branch 'main' of https://github.com/apache/airflow into add-pro…
KamranImaaz Dec 30, 2025
9a21576
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Dec 30, 2025
7116fbe
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Dec 31, 2025
2324c21
modified the logs
KamranImaaz Jan 2, 2026
3a3ca3c
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Jan 2, 2026
566426a
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Jan 3, 2026
31976d5
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Jan 4, 2026
528dc9b
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Jan 4, 2026
fd28700
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Jan 5, 2026
8c756e0
Merge branch 'apache:main' into add-project_id-deprecation-warning
KamranImaaz Jan 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions providers/google/docs/operators/cloud/bigquery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ To fetch data from a BigQuery table you can use
Alternatively you can fetch data for selected columns if you pass fields to
``selected_fields``.

.. note::
The ``project_id`` parameter is **deprecated** and will be removed in a future
release. Please use ``table_project_id`` instead.

The result of this operator can be retrieved in two different formats based on the value of the ``as_dict`` parameter:
``False`` (default) - A Python list of lists, where the number of elements in the nesting list will be equal to the number of rows fetched. Each element in the
nesting will a nested list where elements would represent the column values for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
BigQueryValueCheckTrigger,
)
from airflow.providers.google.cloud.utils.bigquery import convert_job_id
from airflow.providers.google.common.deprecated import deprecated
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
from airflow.utils.helpers import exactly_one

Expand Down Expand Up @@ -1088,17 +1089,21 @@ def generate_query(self, hook: BigQueryHook) -> str:
)
return query

def execute(self, context: Context):
if self.project_id:
self.log.warning(
"The project_id parameter is deprecated, and will be removed in a future release."
" Please use table_project_id instead.",
)
if not self.table_project_id:
self.table_project_id = self.project_id
else:
self.log.info("Ignoring 'project_id' parameter, as 'table_project_id' is found.")
"""Deprecated method to assign project_id to table_project_id."""

@deprecated(
planned_removal_date="June 30, 2026",
use_instead="table_project_id",
category=AirflowProviderDeprecationWarning,
)
def _assign_project_id(self, project_id: str) -> str:
return project_id

def execute(self, context: Context):
if self.project_id != PROVIDE_PROJECT_ID and not self.table_project_id:
self.table_project_id = self._assign_project_id(self.project_id)
elif self.project_id != PROVIDE_PROJECT_ID and self.table_project_id:
self.log.info("Ignoring 'project_id' parameter, as 'table_project_id' is found.")
if not exactly_one(self.job_id, self.table_id):
raise AirflowException(
"'job_id' and 'table_id' parameters are mutually exclusive, "
Expand Down