Skip to content

Commit

Permalink
Merge pull request data-integrations#1386 from data-integrations/PLUG…
Browse files Browse the repository at this point in the history
…IN-1761

[PLUGIN-1761] Add information about no primary key spanner table
  • Loading branch information
itsankit-google authored Mar 13, 2024
2 parents ff50316 + 36948ae commit 0555650
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/Spanner-batchsink.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Each record is composed of columns (also called fields).
Every table is defined by a schema that describes the column names, data types, and other information.
If the table does not exist, it will get created.

**Note**: A table with no primary key columns can have only one row.
Only GoogleSQL-dialect databases can have tables without a primary key.
Please click [here](https://cloud.google.com/spanner/docs/schema-and-data-model) for more details.

**Primary Key**: If the table does not exist, a primary key must be provided in order to auto-create the table.
The key can be a composite key of multiple fields in the schema. This is not required if the table already exists.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public class SpannerSinkConfig extends PluginConfig {
private static final String NAME_CMEK_KEY = "cmekKey";

@Name(NAME_TABLE)
@Description("Cloud Spanner table id. Uniquely identifies your table within the Cloud Spanner database")
@Description("Cloud Spanner table id. Uniquely identifies your table within the Cloud Spanner database."
+ " Note: A table with no primary key columns can have only one row."
+ " Only GoogleSQL-dialect databases can have tables without a primary key."
+ " Please refer to https://cloud.google.com/spanner/docs/schema-and-data-model for more details.")
@Macro
private String table;

Expand Down

0 comments on commit 0555650

Please sign in to comment.