Skip to content

Commit 1e8ce6e

Browse files
Merge pull request #1377 from cloudsufi/BQ-cherrypick-commits
Bq cherrypick commits for 6.9.1
2 parents afcd9c8 + dbd686c commit 1e8ce6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3139
-106
lines changed

docs/BigQueryExecute-action.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ write BigQuery data to this project.
3030

3131
**SQL**: SQL command to execute.
3232

33+
**BQ Job Labels:** Key value pairs to be added as labels to the BigQuery job. Keys must be unique. (Macro Enabled)
34+
35+
[job_source, type] are system defined labels used by CDAP for internal purpose and cannot be used as label keys.
36+
Macro format is supported. example `key1:val1,key2:val2`
37+
38+
Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
39+
For more information about labels, see [Docs](https://cloud.google.com/bigquery/docs/labels-intro#requirements).
40+
3341
**Dialect**: Dialect of the SQL command. The value must be 'legacy' or 'standard'. If set to 'standard',
3442
the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/.
3543
If set to 'legacy', BigQuery's legacy SQL dialect will be used for this query.

docs/BigQueryMultiTable-batchsink.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ write BigQuery data to this project.
4242
Datasets are top-level containers that are used to organize and control access to tables and views.
4343
If dataset does not exist, it will be created.
4444

45+
**BQ Job Labels:** Key value pairs to be added as labels to the BigQuery job. Keys must be unique. (Macro Enabled)
46+
47+
[job_source, type] are system defined labels used by CDAP for internal purpose and cannot be used as label keys.
48+
Macro format is supported. example `key1:val1,key2:val2`
49+
50+
Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
51+
For more information about labels, see [Docs](https://cloud.google.com/bigquery/docs/labels-intro#requirements).
52+
4553
**Temporary Bucket Name:** Google Cloud Storage bucket to store temporary data in.
4654
It will be automatically created if it does not exist. Temporary data will be deleted after it is loaded into BigQuery.
4755
If the bucket was created automatically, it will be deleted after the run finishes.
@@ -247,3 +255,9 @@ GET https://www.googleapis.com/bigquery/v2/projects/xxxx/datasets/mysql_bq_perm?
247255
have the permission to read the dataset you specified in this plugin. You must grant "BigQuery Data Editor" role on the
248256
project identified by the `Dataset Project ID` you specified in this plugin to the service account. If you think you
249257
already granted the role, check if you granted the role on the wrong project (for example the one identified by the `Project ID`).
258+
259+
Column Names
260+
------------
261+
A column name can contain the letters (a-z, A-Z), numbers (0-9), or underscores (_), and it must start with a letter or
262+
underscore. For more flexible column name support, see
263+
[flexible column names](https://cloud.google.com/bigquery/docs/schemas#flexible-column-names).

docs/BigQueryTable-batchsink.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ bucket will be created and then deleted after the run finishes.
5252

5353
**GCS Upload Request Chunk Size**: GCS upload request chunk size in bytes. Default value is 8388608 bytes.
5454

55+
**BQ Job Labels:** Key value pairs to be added as labels to the BigQuery job. Keys must be unique. (Macro Enabled)
56+
57+
[job_source, type] are system defined labels used by CDAP for internal purpose and cannot be used as label keys.
58+
Macro format is supported. example `key1:val1,key2:val2`
59+
60+
Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
61+
For more information about labels, see [Docs](https://cloud.google.com/bigquery/docs/labels-intro#requirements).
62+
63+
**JSON String**: List of fields to be written to BigQuery as a JSON string.
64+
The fields must be of type STRING. To target nested fields, use dot notation.
65+
For example, 'name.first' will target the 'first' field in the 'name' record. (Macro Enabled)
66+
67+
Use a comma-separated list to specify multiple fields in macro format.
68+
Example: "nestedObject.nestedArray.raw, nestedArray.raw".
69+
5570
**Operation**: Type of write operation to perform. This can be set to Insert, Update or Upsert.
5671
* Insert - all records will be inserted in destination table.
5772
* Update - records that match on Table Key will be updated in the table. Records that do not match
@@ -92,6 +107,9 @@ is ignored if the table already exists.
92107
* When this is set to Integer, table will be created with range partitioning.
93108
* When this is set to None, table will be created without time partitioning.
94109

110+
**Time Partitioning Type**: Specifies the time partitioning type. Can either be Daily or Hourly or Monthly or Yearly.
111+
Default is Daily. Ignored when table already exists
112+
95113
**Range Start**: For integer partitioning, specifies the start of the range. Only used when table doesn’t
96114
exist already, and partitioning type is set to Integer.
97115
* The start value is inclusive.
@@ -280,3 +298,9 @@ GET https://www.googleapis.com/bigquery/v2/projects/xxxx/datasets/mysql_bq_perm?
280298
have the permission to read the dataset you specified in this plugin. You must grant "BigQuery Data Editor" role on the
281299
project identified by the `Dataset Project ID` you specified in this plugin to the service account. If you think you
282300
already granted the role, check if you granted the role on the wrong project (for example the one identified by the `Project ID`).
301+
302+
Column Names
303+
------------
304+
A column name can contain the letters (a-z, A-Z), numbers (0-9), or underscores (_), and it must start with a letter or
305+
underscore. For more flexible column name support, see
306+
[flexible column names](https://cloud.google.com/bigquery/docs/schemas#flexible-column-names).

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<groupId>io.cdap.plugin</groupId>
2222
<artifactId>google-cloud</artifactId>
23-
<version>0.22.6</version>
23+
<version>0.22.7-SNAPSHOT</version>
2424
<name>Google Cloud Plugins</name>
2525
<packaging>jar</packaging>
2626
<description>Plugins for Google Big Query</description>
@@ -98,6 +98,7 @@
9898
<slf4j.version>1.7.5</slf4j.version>
9999
<spark3.version>3.1.1</spark3.version>
100100
<spark-bq-connector.version>0.23.1</spark-bq-connector.version>
101+
<failsafe.version>3.3.2</failsafe.version>
101102
<testSourceLocation>${project.basedir}/src/test/java/</testSourceLocation>
102103
</properties>
103104

@@ -820,6 +821,11 @@
820821
</exclusion>
821822
</exclusions>
822823
</dependency>
824+
<dependency>
825+
<groupId>dev.failsafe</groupId>
826+
<artifactId>failsafe</artifactId>
827+
<version>${failsafe.version}</version>
828+
</dependency>
823829
<!-- End: dependencies used by the Spark-BigQuery connector -->
824830
<!-- Start: dependency used by the Dataplex connector -->
825831
<dependency>

0 commit comments

Comments
 (0)