Comments (4)
This is a bug inside SnowflakeAvroConverter. We internally used org.apache.avro.generic.GenericDatumReader
to convert AVRO bytes to JSON in SnowflakeAvroConverter, which does not handle byte array and BigDecimal well. I have a walk around:
-
change your
value.converter
from com.snowflake.kafka.connector.records.SnowflakeAvroConverter to io.confluent.connect.avro.AvroConverter. -
Make sure your Snowflake connector version >= 1.4.2
@drobert FYI the code you commented on is only triggered when non-snowflake-converters are used. If you see further problem after changing to confluent's converter, we can look deeper on the lines that you commented on. Previously if you are using SnowflakeAvroConverter, the conversion from AVRO to JSON happens here: https://github.com/snowflakedb/snowflake-kafka-connector/blob/master/src/main/java/com/snowflake/kafka/connector/records/SnowflakeAvroConverter.java#L175
from snowflake-kafka-connector.
please try to upgrade to 1.4.0, this should have been fixed in #131
from snowflake-kafka-connector.
@sfc-gh-zli Is this issue still ongoing? We are currently on version 1.4.1, and all messages are going into snowflake with this unusable format.
from snowflake-kafka-connector.
Looking at the referenced PR (#131) I commented on a few things that look like they may be contributing: https://github.com/snowflakedb/snowflake-kafka-connector/pull/131/files#r463259581
Notably:
- the conversion code casts the byte array to
BigDecimal
without specifying scale or precision - json Number types don't support arbitrary precision. I would expect only a String representation to be able to represent a BigDecimal accurately
from snowflake-kafka-connector.
Related Issues (20)
- Error inserting Records using Streaming API with msg:The given row cannot be converted to the internal format due to invalid value: Value cannot be ingested into Snowflake column BINARY_COL of type BINARY, Row Index: 0, reason: Not a valid hex string HOT 3
- AvroConverter with SMTs HOT 1
- Snowpipe Streaming Duplicate records / Not Exactly Once HOT 14
- Schema Evolution failing - Quoted field not being found in columnNames HOT 5
- Option to not create new columns in existing table HOT 2
- Ingesting real-time change data to Snowflake HOT 5
- Configuring temporal type formats with Snowpipe Streaming HOT 3
- Transactional ingest HOT 4
- NDJSON support. HOT 4
- `buffer.flush.time` setting not working correctly. HOT 10
- Struct array elements are being serialized before writing to Array column HOT 4
- CVE-2023-39410 in Snowflake-kafka-connect JAR HOT 1
- Where is the 2.1.1 release? HOT 2
- Using configProviders other than file fails validation HOT 3
- google.cloud.storage.StorageException: 401 Unauthorized, causing RECORD_METADATA Exception: Invalid column name HOT 3
- Snowflake Sink committing offsets for null/tombstone messages HOT 4
- `google.cloud.storage.StorageException: 401 Unauthorized` HOT 3
- SNOW-989387 Connectors errored out after updating to v2.1.2 HOT 18
- Insert order when using snowpipe streaming HOT 2
- Streaming Channel Offset Migration (transient exception) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowflake-kafka-connector.