Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

chalmerlowe
Copy link
Collaborator

@chalmerlowe chalmerlowe commented Jul 27, 2023

This PR provides the ability to incorporate additional characters in labels and similar identifiers.

There are a number of characters allowed in BigQuery identifiers that get filtered out in the existing code. The PR prevents that from happening.

A list of the special characters is included here:

An ampersand (&)
A percent sign (%)
An equals sign (=)
A plus sign (+)
A colon (:)
An apostrophe (')
A less-than sign (<)
A greater-than sign (>)
A number sign (#)
A vertical line (|)

Fixes an internal buganizer issue: 🦕

@chalmerlowe chalmerlowe requested review from a team as code owners July 27, 2023 16:49
@chalmerlowe chalmerlowe requested a review from tswast July 27, 2023 16:49
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. labels Jul 27, 2023
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: s Pull request size is small. labels Jul 27, 2023
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: l Pull request size is large. labels Jul 28, 2023
inadvertently uploaded.
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. and removed size: s Pull request size is small. labels Jul 28, 2023
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: xs Pull request size is extra small. labels Aug 4, 2023
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. and removed size: m Pull request size is medium. labels Aug 4, 2023
FIELD_ILLEGAL_CHARACTERS = re.compile(r"[^\w]+")
# Incorporates special characters used in flexible column names:
# https://cloud.google.com/bigquery/docs/schemas#flexible-column-names
FIELD_ILLEGAL_CHARACTERS = re.compile(r"[^\w&%=+:'<>#|]+", re.ASCII)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace is allowed now, right? I used [^!"$()*,./;?@[\\\]^{}~\n]*` in ibis-project/ibis#6557 and it seems to be working alright.

@chalmerlowe chalmerlowe added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Aug 8, 2023
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Aug 8, 2023
@tswast tswast merged commit 3328d0a into main Aug 8, 2023
@tswast tswast deleted the process-labels branch August 8, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants