snowflakedb / snowflake-kafka-connector

Snowflake Kafka Connector (Sink Connector)
Apache License 2.0
140 stars 98 forks source link

No snow use com.fasterxml json #994

Closed sfc-gh-bzabek closed 1 week ago

sfc-gh-bzabek commented 1 week ago

Overview

NO-SNOW

I need to have standard com.fasterxml to be compatible with IcebergUtils when parsing a KafkaRecord into Iceberg Type. Entire connector uses net.snowflake.client.jdbc.internal.fasterxml.

It's because snowflake JDBC driver uses "shading" in its pom.xml. Even though the driver uses standard com.fasterxml after compiling it into a jar the package is net.snowflake.client.jdbc.internal.fasterxml. JDBC driver exposed telemetry method that requires net.snowflake.client.jdbc.internal.fasterxml as an argument - TelemetryUtil.buildJobData(ObjectNode obj). As a result the whole connector is bounded to the type inherited from the driver.

There are to approaches two solve it:

Or I can do hacks before parsing a json to Iceberg.

Pre-review checklist

sfc-gh-bzabek commented 1 week ago

Kafka Connector and snowflake-jdbc use the same 2.17.2 version of Jackson so it shouldn't be a problem to replace it.

Could you ask JDBC team what is the reason for using shaded library in the public interface? Maybe they can provide more convenient api for us?

Yes I will ask them.

sfc-gh-bzabek commented 1 week ago

Kafka Connector and snowflake-jdbc use the same 2.17.2 version of Jackson so it shouldn't be a problem to replace it. Could you ask JDBC team what is the reason for using shaded library in the public interface? Maybe they can provide more convenient api for us?

Yes I will ask them.

I tried to use snowflake-jdbc-thin however it failed becouse ingest-sdk is still bouded with jdbc-driver internals.