GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Time partitioning on DATE column fails with type_="DAY" · Issue #1056 · googleapis/python-bigquery-sqlalchemy

This repository was archived by the owner on May 16, 2026. It is now read-only.
This repository was archived by the owner on May 16, 2026. It is now read-only.

Time partitioning on DATE column fails with type_="DAY" #1056

Copy link
Copy link
Closed
#1074
Closed
Time partitioning on DATE column fails with type_="DAY"#1056
#1074
Copy link
Assignees
chalmerlowe
Labels
api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.

Description

@bnaul
bnaul
opened on Apr 5, 2024
Issue body actions

Changing field="timestamp_c" to field="date_c" in test_create_table (

python-bigquery-sqlalchemy/tests/system/test_sqlalchemy_bigquery.py

Line 584 in 7a4c3c2

field="timestamp_c",
) gives the following error:

DatabaseError: (google.cloud.bigquery.dbapi.exceptions.DatabaseError) 400 

PARTITION BY expression must be

_PARTITIONDATE,
DATE(_PARTITIONTIME),
DATE(<timestamp_column>),
DATE(<datetime_column>),
DATETIME_TRUNC(<datetime_column>, DAY/HOUR/MONTH/YEAR),
a DATE column,
TIMESTAMP_TRUNC(<timestamp_column>, DAY/HOUR/MONTH/YEAR),
DATE_TRUNC(<date_column>, MONTH/YEAR),
or RANGE_BUCKET(<int64_column>, GENERATE_ARRAY(<int64_value>, <int64_value>[, <int64_value>]))

Passing e.g. type_="MONTH" works since that's a supported partitioning function.

Activity

  1. product-auto-label
    added
    api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.
    on Apr 5, 2024
  2. bnaul
    added a commit that references this issue on Apr 5, 2024

    fix: Fix partitioning by DATE column

    This issue will close once commit 43ac9e8 is merged into the 'master' branch.
    43ac9e8
  3. chalmerlowe
    self-assigned this
    on Apr 8, 2024
  4. bnaul
    added 3 commits that reference this issue on May 9, 2024

    fix: Fix partitioning by DATE column

    This issue will close once commit 8c13404 is merged into the 'master' branch.
    8c13404

    fix: Fix partitioning by DATE column

    This issue will close once commit 3da9bee is merged into the 'master' branch.
    3da9bee

    fix: Fix partitioning by DATE column

    This issue will close once commit 6cb65cd is merged into the 'main' branch.
    6cb65cd
  5. chalmerlowe
    closed this as completedin #1074on May 13, 2024
  6. chalmerlowe
    added a commit that references this issue on May 13, 2024

    fix: Fix partitioning by DATE column (#1074)

    This issue will close once commit ad69c63 is merged into the 'main' branch.
    ad69c63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @chalmerlowe
    chalmerlowe

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.