Skip to content

Commit

Permalink
[yaml] add JDBC docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <[email protected]>
  • Loading branch information
Polber committed Nov 14, 2024
1 parent 0cafb46 commit e30d1dc
Show file tree
Hide file tree
Showing 16 changed files with 908 additions and 226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,40 +76,34 @@ public String description() {
+ "\n"
+ "Example configuration for performing a read using a SQL query: ::\n"
+ "\n"
+ " pipeline:\n"
+ " transforms:\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " query: 'SELECT * FROM table'\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " query: 'SELECT * FROM table'\n"
+ "\n"
+ "It is also possible to read a table by specifying a table name and a list of columns. For "
+ "example, the following configuration will perform a read on an entire table: ::\n"
+ "\n"
+ " pipeline:\n"
+ " transforms:\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " table: 'my-table'\n"
+ " columns: ['col1', 'col2']\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " table: 'my-table'\n"
+ " columns: ['col1', 'col2']\n"
+ "\n"
+ "Additionally, to read using a <a href=\"https://cloud.google.com/spanner/docs/secondary-indexes\">"
+ "Secondary Index</a>, specify the index name: ::"
+ "\n"
+ " pipeline:\n"
+ " transforms:\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " table: 'my-table'\n"
+ " index: 'my-index'\n"
+ " columns: ['col1', 'col2']\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " table: 'my-table'\n"
+ " index: 'my-index'\n"
+ " columns: ['col1', 'col2']\n"
+ "\n"
+ "### Advanced Usage\n"
+ "#### Advanced Usage\n"
+ "\n"
+ "Reads by default use the <a href=\"https://cloud.google.com/spanner/docs/reads#read_data_in_parallel\">"
+ "PartitionQuery API</a> which enforces some limitations on the type of queries that can be used so that "
Expand All @@ -118,12 +112,10 @@ public String description() {
+ "\n"
+ "For example: ::"
+ "\n"
+ " pipeline:\n"
+ " transforms:\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " batching: false\n"
+ " ...\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " batching: false\n"
+ " ...\n"
+ "\n"
+ "Note: See <a href=\""
+ "https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.html\">"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,12 @@ public String description() {
+ "\n"
+ "Example configuration for performing a write to a single table: ::\n"
+ "\n"
+ " pipeline:\n"
+ " transforms:\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " project_id: 'my-project-id'\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " table: 'my-table'\n"
+ " - type: ReadFromSpanner\n"
+ " config:\n"
+ " project_id: 'my-project-id'\n"
+ " instance_id: 'my-instance-id'\n"
+ " database_id: 'my-database'\n"
+ " table: 'my-table'\n"
+ "\n"
+ "Note: See <a href=\""
+ "https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.html\">"
Expand Down
Loading

0 comments on commit e30d1dc

Please sign in to comment.