Skip to content

Commit fa8691d

Browse files
authored
chore(firestore-bigquery-changetracker): fix tests (#2256)
1 parent b465a22 commit fa8691d

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

firestore-bigquery-export/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
feat - add basic materialized views support
44

5+
fix - do not add/update clustering if an invalid clustering field is present.
6+
57
## Version 0.1.56
68

79
feat - improve sync strategy by immediately writing to BQ, and using cloud tasks only as a last resort

firestore-bigquery-export/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ essential for the script to insert data into an already partitioned table.)
258258

259259
* BigQuery SQL Time Partitioning table schema field(column) type: Parameter for BigQuery SQL schema field type for the selected Time Partitioning Firestore Document field option. Cannot be changed if Table is already partitioned.
260260

261-
* BigQuery SQL table clustering: This parameter will allow you to set up Clustering for the BigQuery Table created by the extension. (for example: `data,document_id,timestamp`- no whitespaces). You can select up to 4 comma separated fields. The order of the specified columns determines the sort order of the data. Available schema extensions table fields for clustering: `document_id, document_name, timestamp, event_id, operation, data`.
261+
* BigQuery SQL table clustering: This parameter allows you to set up clustering for the BigQuery table created by the extension. Specify up to 4 comma-separated fields (for example: `data,document_id,timestamp` - no whitespaces). The order of the specified columns determines the sort order of the data.
262+
Note: Cluster columns must be top-level, non-repeated columns of one of the following types: BIGNUMERIC, BOOL, DATE, DATETIME, GEOGRAPHY, INT64, NUMERIC, RANGE, STRING, TIMESTAMP. Clustering will not be added if a field with an invalid type is present in this parameter.
263+
Available schema extensions table fields for clustering include: `document_id, document_name, timestamp, event_id, operation, data`.
262264

263265
* 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.
264266

firestore-bigquery-export/extension.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,18 @@ params:
310310
- param: CLUSTERING
311311
label: BigQuery SQL table clustering
312312
description: >-
313-
This parameter will allow you to set up Clustering for the BigQuery Table
314-
created by the extension. (for example: `data,document_id,timestamp`- no
315-
whitespaces). You can select up to 4 comma separated fields. The order of
316-
the specified columns determines the sort order of the data. Available
317-
schema extensions table fields for clustering: `document_id,
318-
document_name, timestamp, event_id, operation, data`.
313+
This parameter allows you to set up clustering for the BigQuery table
314+
created by the extension. Specify up to 4 comma-separated fields (for
315+
example: `data,document_id,timestamp` - no whitespaces). The order of the
316+
specified columns determines the sort order of the data.
317+
318+
Note: Cluster columns must be top-level, non-repeated columns of one of
319+
the following types: BIGNUMERIC, BOOL, DATE, DATETIME, GEOGRAPHY, INT64,
320+
NUMERIC, RANGE, STRING, TIMESTAMP. Clustering will not be added if a
321+
field with an invalid type is present in this parameter.
322+
323+
Available schema extensions table fields for clustering include:
324+
`document_id, document_name, timestamp, event_id, operation, data`.
319325
type: string
320326
validationRegex: ^[^,\s]+(?:,[^,\s]+){0,3}$
321327
validationErrorMessage:

firestore-bigquery-export/functions/__tests__/__snapshots__/config.test.ts.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Object {
3939

4040
exports[`extension config config.clustering param exists 1`] = `
4141
Object {
42-
"description": "This parameter will allow you to set up Clustering for the BigQuery Table created by the extension. (for example: \`data,document_id,timestamp\`- no whitespaces). You can select up to 4 comma separated fields. The order of the specified columns determines the sort order of the data. Available schema extensions table fields for clustering: \`document_id, document_name, timestamp, event_id, operation, data\`.",
42+
"description": "This parameter allows you to set up clustering for the BigQuery table created by the extension. Specify up to 4 comma-separated fields (for example: \`data,document_id,timestamp\` - no whitespaces). The order of the specified columns determines the sort order of the data.
43+
Note: Cluster columns must be top-level, non-repeated columns of one of the following types: BIGNUMERIC, BOOL, DATE, DATETIME, GEOGRAPHY, INT64, NUMERIC, RANGE, STRING, TIMESTAMP. Clustering will not be added if a field with an invalid type is present in this parameter.
44+
Available schema extensions table fields for clustering include: \`document_id, document_name, timestamp, event_id, operation, data\`.",
4345
"example": "data,document_id,timestamp",
4446
"label": "BigQuery SQL table clustering",
4547
"param": "CLUSTERING",

0 commit comments

Comments
 (0)