You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(firestore-bigquery-export): support materialized views
* chore(firestore-bigquery-export): bump version and changelog
* chore(firestore-bigquery-export): format and fix snapshot test
Copy file name to clipboardExpand all lines: firestore-bigquery-export/PREINSTALL.md
+75Lines changed: 75 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,81 @@ Prior to sending the document change to BigQuery, you have an opportunity to tra
69
69
70
70
The response should be indentical in structure.
71
71
72
+
#### Materialized Views
73
+
74
+
This extension supports both regular views and materialized views in BigQuery. While regular views compute their results each time they're queried, materialized views store their query results, providing faster access at the cost of additional storage.
75
+
76
+
There are two types of materialized views available:
77
+
78
+
1.**Non-incremental Materialized Views**: These views support more complex queries including filtering on aggregated fields, but require complete recomputation during refresh.
79
+
80
+
2.**Incremental Materialized Views**: These views update more efficiently by processing only new or changed records, but come with query restrictions. Most notably, they don't allow filtering or partitioning on aggregated fields in their defining SQL, among other limitations.
81
+
82
+
**Important Considerations:**
83
+
- Neither type of materialized view in this extension currently supports partitioning or clustering
84
+
- Both types allow you to configure refresh intervals and maximum staleness settings during extension installation or configuration
85
+
- Once created, a materialized view's SQL definition cannot be modified. If you reconfigure the extension to change either the view type (incremental vs non-incremental) or the SQL query, the extension will drop the existing materialized view and recreate it
86
+
- Carefully consider your use case before choosing materialized views:
87
+
- They incur additional storage costs as they cache query results
88
+
- Non-incremental views may have higher processing costs during refresh
89
+
- Incremental views have more query restrictions but are more efficient to update
90
+
91
+
Example of a non-incremental materialized view SQL definition generated by the extension:
Please review [BigQuery's documentation on materialized views](https://cloud.google.com/bigquery/docs/materialized-views-intro) to fully understand the implications for your use case.
146
+
72
147
#### Using Customer Managed Encryption Keys
73
148
74
149
By default, BigQuery encrypts your content stored at rest. BigQuery handles and manages this default encryption for you without any additional actions on your part.
Copy file name to clipboardExpand all lines: firestore-bigquery-export/README.md
+81Lines changed: 81 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,81 @@ Prior to sending the document change to BigQuery, you have an opportunity to tra
77
77
78
78
The response should be indentical in structure.
79
79
80
+
#### Materialized Views
81
+
82
+
This extension supports both regular views and materialized views in BigQuery. While regular views compute their results each time they're queried, materialized views store their query results, providing faster access at the cost of additional storage.
83
+
84
+
There are two types of materialized views available:
85
+
86
+
1.**Non-incremental Materialized Views**: These views support more complex queries including filtering on aggregated fields, but require complete recomputation during refresh.
87
+
88
+
2.**Incremental Materialized Views**: These views update more efficiently by processing only new or changed records, but come with query restrictions. Most notably, they don't allow filtering or partitioning on aggregated fields in their defining SQL, among other limitations.
89
+
90
+
**Important Considerations:**
91
+
- Neither type of materialized view in this extension currently supports partitioning or clustering
92
+
- Both types allow you to configure refresh intervals and maximum staleness settings during extension installation or configuration
93
+
- Once created, a materialized view's SQL definition cannot be modified. If you reconfigure the extension to change either the view type (incremental vs non-incremental) or the SQL query, the extension will drop the existing materialized view and recreate it
94
+
- Carefully consider your use case before choosing materialized views:
95
+
- They incur additional storage costs as they cache query results
96
+
- Non-incremental views may have higher processing costs during refresh
97
+
- Incremental views have more query restrictions but are more efficient to update
98
+
99
+
Example of a non-incremental materialized view SQL definition generated by the extension:
Please review [BigQuery's documentation on materialized views](https://cloud.google.com/bigquery/docs/materialized-views-intro) to fully understand the implications for your use case.
154
+
80
155
#### Using Customer Managed Encryption Keys
81
156
82
157
By default, BigQuery encrypts your content stored at rest. BigQuery handles and manages this default encryption for you without any additional actions on your part.
@@ -187,6 +262,12 @@ essential for the script to insert data into an already partitioned table.)
187
262
188
263
* Maximum number of synced documents per second: This parameter will set the maximum number of syncronised documents per second with BQ. Please note, any other external updates to a Big Query table will be included within this quota. Ensure that you have a set a low enough number to compensate. Defaults to 10.
189
264
265
+
* View Type: Select the type of view to create in BigQuery. A regular view is a virtual table defined by a SQL query. A materialized view persists the results of a query for faster access, with either incremental or non-incremental updates. Please note that materialized views in this extension come with several important caveats and limitations - carefully review the pre-install documentation before selecting these options to ensure they are appropriate for your use case.
266
+
267
+
* Maximum Staleness Duration: For materialized views only: Specifies the maximum staleness acceptable for the materialized view. Should be specified as an INTERVAL value following BigQuery SQL syntax. This parameter will only take effect if View Type is set to a materialized view option.
268
+
269
+
* Refresh Interval (Minutes): For materialized views only: Specifies how often the materialized view should be refreshed, in minutes. This parameter will only take effect if View Type is set to a materialized view option.
270
+
190
271
* Backup Collection Name: This (optional) parameter will allow you to specify a collection for which failed BigQuery updates will be written to.
191
272
192
273
* Transform function URL: Specify a function URL to call that will transform the payload that will be written to BigQuery. See the pre-install documentation for more details.
0 commit comments