-
Notifications
You must be signed in to change notification settings - Fork 322
Description
Is your feature request related to a problem? Please describe.
Currently, the google-cloud-bigquery Python client library lacks a property to get or set the maxStaleness attribute in table definitions. This omission makes it challenging to programmatically manage table staleness settings, which are crucial for controlling data freshness and consistency in time-sensitive applications.
Describe the solution you'd like
Introduce a getter and setter for the maxStaleness property within the Table class. This addition would allow users to specify the maximum staleness of data that a query can tolerate when reading from the table, thereby providing finer control over data consistency and performance.
Describe alternatives you've considered
As a workaround, users can directly interact with the BigQuery REST API to set the maxStaleness property. However, this approach is less convenient and requires additional code to handle API requests and responses, detracting from the simplicity offered by the client library.
Additional context
The maxStaleness property is a critical setting for applications that need to balance data freshness against performance and cost considerations. By incorporating this property into the client library, users can more easily manage these trade-offs within their Python applications.
This feature request is inspired by the recent addition of the allowNonIncrementalDefinition property for materialized views, as discussed in issue #2083.
Implementing this feature would enhance the usability of the google-cloud-bigquery Python client library by providing comprehensive access to table properties, thereby facilitating more effective data management strategies.