Skip to content

feat: Add null_markers property to LoadJobConfig and CSVOptions #2239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2025

Conversation

chalmerlowe
Copy link
Collaborator

@chalmerlowe chalmerlowe commented Jul 15, 2025

This commit introduces new configuration options for BigQuery load jobs and external table definitions, aligning with recent updates to the underlying protos.

New option(s) added:

null_markers: Represents a sequence of null values. (Applies to LoadJobConfig, LoadJob, and ExternalConfig)

Changes include:

Added corresponding properties (getters/setters) to LoadJobConfig, LoadJob, and ExternalConfig.
Updated docstrings and type hints for all new attributes.
Updated unit tests to cover the new options, ensuring they are correctly handled during object initialization, serialization to API representation, and deserialization from API responses.

Fixes: #830

@chalmerlowe chalmerlowe requested review from a team as code owners July 15, 2025 13:11
@chalmerlowe chalmerlowe requested a review from Linchin July 15, 2025 13:11
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels Jul 15, 2025
@chalmerlowe chalmerlowe removed the request for review from Linchin July 15, 2025 13:13
@chalmerlowe chalmerlowe added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 15, 2025
@chalmerlowe chalmerlowe requested a review from tswast July 15, 2025 17:41
@chalmerlowe chalmerlowe removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 15, 2025
@@ -42,6 +42,7 @@ def _setUpConstants(self):
self.TIME_ZONE = "UTC"
self.TIME_FORMAT = "%H:%M:%S"
self.TIMESTAMP_FORMAT = "YYYY-MM-DD HH:MM:SS.SSSSSSZ"
self.NULL_MARKERS = ["", "NA"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit (more of an FYI than a blocker): I really dislike the pattern of hiding test data in the setup methods, but since this is the existing convention, we should probably wait to clean that up in a separate PR.

tests should never rely on default values that are specified by a helper method

See https://testing.googleblog.com/2018/02/testing-on-toilet-cleanly-create-test.html

@chalmerlowe chalmerlowe merged commit 289446d into main Jul 15, 2025
29 checks passed
@chalmerlowe chalmerlowe deleted the feat-add-null-markers branch July 15, 2025 18:32
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 API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Provide option to have multiple null markers
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy