Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

feat: Add null_markers property to LoadJobConfig and CSVOptions - #2239

Merged
chalmerlowe merged 2 commits into
mainfrom
feat-add-null-markers
Jul 15, 2025
Merged

feat: Add null_markers property to LoadJobConfig and CSVOptions#2239
chalmerlowe merged 2 commits into
mainfrom
feat-add-null-markers

Conversation

@chalmerlowe

@chalmerlowechalmerlowe commented Jul 15, 2025

Copy link
Copy Markdown
Collaborator

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 and LinchinJuly 15, 2025 13:11
@product-auto-labelproduct-auto-labelBot 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 LinchinJuly 15, 2025 13:13
@chalmerlowechalmerlowe 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 tswastJuly 15, 2025 17:41
@chalmerlowechalmerlowe removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 15, 2025
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
Copy Markdown
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 mainJul 15, 2025
29 checks passed
@chalmerlowe
chalmerlowe deleted the feat-add-null-markers branch July 15, 2025 18:32
@release-pleaserelease-pleaseBot mentioned this pull request Jul 15, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: mPull 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

@chalmerlowe@tswast@suzmue@chelsea-lin