Repository: apache/airflow
File: providers/google/src/airflow/providers/google/cloud/operators/bigquery.py (Python)

Code before:
        If set as a sequence, the identities from the list must grant
        Service Account Token Creator IAM role to the directly preceding identity, with first
        account from the list granting this role to the originating account (templated).
    :param deferrable: Run operator in the deferrable mode
    :param poll_interval: (Deferrable mode only) polling period in seconds to check for the status of job.
        Defaults to 4 seconds.
    :param as_dict: if True returns the result as a list of dictionaries, otherwise as list of lists
        (default: False).
    :param use_legacy_sql: Whether to use legacy SQL (true) or standard SQL (false).
    """

    template_fields: Sequence[str] = (
        "dataset_id",
        "table_id",
        "table_project_id",
        "job_id",
        "job_project_id",
        "project_id",
        "max_results",
        "selected_fields",
        "gcp_conn_id",
        "impersonation_chain",
    )
    ui_color = BigQueryUIColors.QUERY.value

    @deprecated(planned_removal_date = "June 30, 2026", use_instead = "table_project_id", 
                category = AirflowProviderDeprecationWarning
        )
    def __init__(
        self,
        *,
        dataset_id: str | None = None,
        table_id: str | None = None,
        table_project_id: str | None = None,
        job_id: str | None = None,
        job_project_id: str | None = None,
        project_id: str = PROVIDE_PROJECT_ID,
        max_results: int = 100,
        selected_fields: str | None = None,
        gcp_conn_id: str = "google_cloud_default",
        location: str | None = None,
        encryption_configuration: dict | None = None,
        impersonation_chain: str | Sequence[str] | None = None,
        deferrable: bool = conf.getboolean("operators", "default_deferrable", fallback=False),
        poll_interval: float = 4.0,
        as_dict: bool = False,
        use_legacy_sql: bool = True,
        **kwargs,
    ) -> None:
        super().__init__(**kwargs)
        

Review comment (suggestion):
I don't think it's going to wrk as expected - it will raise deprecation **always** not only when project_id is used/

Code after:
        Service Account Token Creator IAM role to the directly preceding identity, with first
        account from the list granting this role to the originating account (templated).
    :param deferrable: Run operator in the deferrable mode
    :param poll_interval: (Deferrable mode only) polling period in seconds to check for the status of job.
        Defaults to 4 seconds.
    :param as_dict: if True returns the result as a list of dictionaries, otherwise as list of lists
        (default: False).
    :param use_legacy_sql: Whether to use legacy SQL (true) or standard SQL (false).
    """

    template_fields: Sequence[str] = (
        "dataset_id",
        "table_id",
        "table_project_id",
        "job_id",
        "job_project_id",
        "project_id",
        "max_results",
        "selected_fields",
        "gcp_conn_id",
        "impersonation_chain",
    )
    ui_color = BigQueryUIColors.QUERY.value

    def __init__(
        self,
        *,
        dataset_id: str | None = None,
        table_id: str | None = None,
        table_project_id: str | None = None,
        job_id: str | None = None,
        job_project_id: str | None = None,
        project_id: str = PROVIDE_PROJECT_ID,
        max_results: int = 100,
        selected_fields: str | None = None,
        gcp_conn_id: str = "google_cloud_default",
        location: str | None = None,
        encryption_configuration: dict | None = None,
        impersonation_chain: str | Sequence[str] | None = None,
        deferrable: bool = conf.getboolean("operators", "default_deferrable", fallback=False),
        poll_interval: float = 4.0,
        as_dict: bool = False,
        use_legacy_sql: bool = True,
        **kwargs,
    ) -> None:
        super().__init__(**kwargs)

        self.table_project_id = table_project_id
        self.dataset_id = dataset_id
        self.table_id = table_id
        self.job_project_id = job_project_id