Skip to content

bug: BigQuery backend create_view doesn't handle project in database arg #11974

@ajmarks

Description

@ajmarks

What happened?

With the BigQuery backend backend.create_view(...) attaches the default project name to the database argument even if it has one. This contrasts with backend.create_table(...), which functions correctly:

_DATASET= "my-project.my_dataset"

# Works fine
_backend.create_table("my_table", obj=my_query, database=_DATASET, overwrite=True)
# Fails: ValueError: my-project.my-project.my_dataset is not a BigQuery dataset. More info https://cloud.google.com/bigquery/docs/datasets-intro
_backend.create_view("my_table", obj=my_query, database=_DATASET, overwrite=True)

The proximate cause seems to be that the BigQuery create_table(...) calls self._parse_project_and_dataset(database), but create_view uses self._to_catalog_db_tuple(table_loc).

What version of ibis are you using?

10.0.0

What backend(s) are you using, if any?

BigQuery

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior inside of ibis

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions