forked from snowflakedb/snowflake-kafka-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNOW-938038: Support AVRO Logical Types (snowflakedb#722)
There're 10 AVRO logical types listed in https://avro.apache.org/docs/1.11.0/spec.html#Logical+Types and we're able to support 4 of them, the mapping is as below: date -> DATE time-mills -> TIME(6) timestamp-mills -> TIMESTAMP_NTZ(6) decimal -> VARCHAR (We can't do NUMBER because we could have precision bigger than 36) We can't do for the rest of 6 types because that's not supported by ConnectSchema, see code for more detail. We need to find another way to support other logical types or any sources (like Debezium).
- Loading branch information
1 parent
7b128ee
commit be7a7af
Showing
11 changed files
with
239 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
test/rest_request_template/travis_correct_schema_evolution_avro_sr_logical_types.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "SNOWFLAKE_CONNECTOR_NAME", | ||
"config": { | ||
"connector.class": "com.snowflake.kafka.connector.SnowflakeSinkConnector", | ||
"topics": "SNOWFLAKE_TEST_TOPIC0,SNOWFLAKE_TEST_TOPIC1", | ||
"snowflake.topic2table.map": "SNOWFLAKE_TEST_TOPIC0:SNOWFLAKE_CONNECTOR_NAME,SNOWFLAKE_TEST_TOPIC1:SNOWFLAKE_CONNECTOR_NAME", | ||
"tasks.max": "1", | ||
"buffer.flush.time": "10", | ||
"buffer.count.records": "100", | ||
"buffer.size.bytes": "5000000", | ||
"snowflake.url.name": "SNOWFLAKE_HOST", | ||
"snowflake.user.name": "SNOWFLAKE_USER", | ||
"snowflake.private.key": "SNOWFLAKE_PRIVATE_KEY", | ||
"snowflake.database.name": "SNOWFLAKE_DATABASE", | ||
"snowflake.schema.name": "SNOWFLAKE_SCHEMA", | ||
"snowflake.role.name": "SNOWFLAKE_ROLE", | ||
"snowflake.ingestion.method": "SNOWPIPE_STREAMING", | ||
"key.converter": "org.apache.kafka.connect.storage.StringConverter", | ||
"value.converter":"io.confluent.connect.avro.AvroConverter", | ||
"value.converter.schema.registry.url":"CONFLUENT_SCHEMA_REGISTRY", | ||
"value.converter.schemas.enable": "false", | ||
"jmx": "true", | ||
"errors.tolerance": "all", | ||
"errors.log.enable": true, | ||
"errors.deadletterqueue.topic.name": "DLQ_TOPIC", | ||
"errors.deadletterqueue.topic.replication.factor": 1, | ||
"snowflake.enable.schematization": true | ||
} | ||
} |
Oops, something went wrong.