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
Copy file name to clipboardExpand all lines: modules/components/pages/outputs/snowflake_streaming.adoc
+17-37Lines changed: 17 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,19 +38,12 @@ output:
38
38
CREATE TABLE IF NOT EXISTS mytable (amount NUMBER);
39
39
schema_evolution:
40
40
enabled: false # No default (required)
41
-
new_column_type_mapping: |-
42
-
root = match this.value.type() {
43
-
this == "string" => "STRING"
44
-
this == "bytes" => "BINARY"
45
-
this == "number" => "DOUBLE"
46
-
this == "bool" => "BOOLEAN"
47
-
this == "timestamp" => "TIMESTAMP"
48
-
_ => "VARIANT"
41
+
processors: [] # No default (optional)
49
42
batching:
50
43
count: 0
51
44
byte_size: 0
52
-
period: ""
53
-
check: ""
45
+
period: "" # No default (optional)
46
+
check: "" # No default (optional)
54
47
max_in_flight: 4
55
48
```
56
49
@@ -78,23 +71,15 @@ output:
78
71
CREATE TABLE IF NOT EXISTS mytable (amount NUMBER);
79
72
schema_evolution:
80
73
enabled: false # No default (required)
81
-
new_column_type_mapping: |-
82
-
root = match this.value.type() {
83
-
this == "string" => "STRING"
84
-
this == "bytes" => "BINARY"
85
-
this == "number" => "DOUBLE"
86
-
this == "bool" => "BOOLEAN"
87
-
this == "timestamp" => "TIMESTAMP"
88
-
_ => "VARIANT"
89
-
}
74
+
processors: [] # No default (optional)
90
75
build_options:
91
76
parallelism: 1
92
77
chunk_size: 50000
93
78
batching:
94
79
count: 0
95
80
byte_size: 0
96
-
period: ""
97
-
check: ""
81
+
period: "" # No default (optional)
82
+
check: "" # No default (optional)
98
83
processors: [] # No default (optional)
99
84
max_in_flight: 4
100
85
channel_prefix: channel-${HOST} # No default (optional)
@@ -327,28 +312,23 @@ Whether schema evolution is enabled. When set to `true`, the Snowflake table is
327
312
328
313
*Type*: `bool`
329
314
330
-
=== `schema_evolution.new_column_type_mapping`
315
+
=== `schema_evolution.processors`
331
316
332
-
A mapping function from the Redpanda Connect data types to column data types in Snowflake. This mapping should result in the assignment of a string to the `root` variable with the data type for the new column in Snowflake.
317
+
A series of processors to execute when new columns are added to the Snowflake table. You can use these processors to:
333
318
334
-
The input to this mapping is an object with the value and the name of the new column. For example: `{"value": 42.3, "name":"new_data_field"}"`.
319
+
- Run side effects when the schema evolves.
320
+
- Enrich the message with additional information to guide the schema changes.
335
321
336
-
You can also override the mapping function to customize data types.
322
+
For example, a processor could read the schema from the schema registry that a message was produced with and use that schema to determine the data type of the new column in Snowflake.
337
323
338
-
*Type*: `string`
324
+
The input to these processors is an object with the value and name of the new column, the original message, and details of the Snowflake table the output writes to.
The output from the processors must be a valid message, which contains a string that specifies the column type for the new column in Snowflake. The metadata remains the same as in the original message that triggered the schema update.
0 commit comments