Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3359ef3

Browse files
feat: add property forallowNonIncrementalDefinition for materialized view (#2084)
* feat: property for `allowNonIncrementalDefinition` materialized viewSigned-off-by: Yu Ishikawa <yu-iskw@users.noreply.github.com>formatSigned-off-by: Yu Ishikawa <yu-iskw@users.noreply.github.com>* Update tests/unit/test_table.pyCo-authored-by: Chalmer Lowe <chalmerlowe@google.com>* Update google/cloud/bigquery/table.pyCo-authored-by: Chalmer Lowe <chalmerlowe@google.com>---------Signed-off-by: Yu Ishikawa <yu-iskw@users.noreply.github.com>Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
1 parent9e19ecd commit3359ef3

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

‎google/cloud/bigquery/table.py‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ class Table(_TableBase):
390390
"mview_last_refresh_time": ["materializedView","lastRefreshTime"],
391391
"mview_query":"materializedView",
392392
"mview_refresh_interval":"materializedView",
393+
"mview_allow_non_incremental_definition":"materializedView",
393394
"num_bytes":"numBytes",
394395
"num_rows":"numRows",
395396
"partition_expiration":"timePartitioning",
@@ -928,6 +929,28 @@ def mview_refresh_interval(self, value):
928929
refresh_interval_ms,
929930
)
930931

932+
@property
933+
defmview_allow_non_incremental_definition(self):
934+
"""Optional[bool]: This option declares the intention to construct a
935+
materialized view that isn't refreshed incrementally.
936+
The default value is :data:`False`.
937+
"""
938+
api_field=self._PROPERTY_TO_API_FIELD[
939+
"mview_allow_non_incremental_definition"
940+
]
941+
return_helpers._get_sub_prop(
942+
self._properties, [api_field,"allowNonIncrementalDefinition"]
943+
)
944+
945+
@mview_allow_non_incremental_definition.setter
946+
defmview_allow_non_incremental_definition(self,value):
947+
api_field=self._PROPERTY_TO_API_FIELD[
948+
"mview_allow_non_incremental_definition"
949+
]
950+
_helpers._set_sub_prop(
951+
self._properties, [api_field,"allowNonIncrementalDefinition"],value
952+
)
953+
931954
@property
932955
defstreaming_buffer(self):
933956
"""google.cloud.bigquery.StreamingBuffer: Information about a table's

‎tests/unit/test_table.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,16 @@ def test_mview_refresh_interval(self):
10501050
table.mview_refresh_interval=None
10511051
self.assertIsNone(table.mview_refresh_interval)
10521052

1053+
deftest_mview_allow_non_incremental_definition(self):
1054+
table=self._make_one()
1055+
self.assertIsNone(table.mview_allow_non_incremental_definition)
1056+
table.mview_allow_non_incremental_definition=True
1057+
self.assertTrue(table.mview_allow_non_incremental_definition)
1058+
table.mview_allow_non_incremental_definition=False
1059+
self.assertFalse(table.mview_allow_non_incremental_definition)
1060+
table.mview_allow_non_incremental_definition=None
1061+
self.assertIsNone(table.mview_allow_non_incremental_definition)
1062+
10531063
deftest_from_string(self):
10541064
cls=self._get_target_class()
10551065
got=cls.from_string("string-project.string_dataset.string_table")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp