KEMBAR78
feat: Add null_markers property to LoadJobConfig and CSVOptions by chalmerlowe · Pull Request #2239 · googleapis/python-bigquery · GitHub
Skip to content

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
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