sfquickstarts: Cannot run CDCSimulatorClient for streaming
Describe the bug I follow tutorial https://quickstarts.snowflake.com/guide/CDC_SnowpipeStreaming_DynamicTables/#4 but I’ve stucked in step 4.
To Reproduce Steps to reproduce the behavior:
- Go through steps 1-4 of the tutorial above
- Run
Test.batthat works correctly 🟢
java -cp lib/snowflake-ingest-sdk-1.0.2-beta.7.jar:lib/slf4j-api-2.0.6.jar:lib/slf4j-simple-2.0.6.jar --add-opens=java.base/java.nio=ALL-UNNAMED -jar CDCSimulatorClient.jar TEST
** Successfully Connected, Test complete! **
- Run script
Run_MAX.bat - I see an error 🔴
C:\dev\..\..\CDCSimulatorApp
java -cp lib/snowflake-ingest-sdk-1.0.2-beta.7.jar:lib/slf4j-api-2.0.6.jar:lib/slf4j-simple-2.0.6.jar --add-opens=java.base/java.nio=ALL-UNNAMED -jar CDCSimulatorClient.jar MAX
ORDER: 41bb788ebd5503
Exception in thread "main" net.snowflake.ingest.utils.SFException: The given row cannot be converted to Arrow format: {"object":"cdc_db_ta.... Value cannot be ingested into Snowflake column VARIANT: Not a valid JSON
at net.snowflake.ingest.streaming.internal.DataValidationUtil.valueFormatNotAllowedException(DataValidationUtil.java:740)
at net.snowflake.ingest.streaming.internal.DataValidationUtil.validateAndParseSemiStructuredAsJsonTree(DataValidationUtil.java:95)
at net.snowflake.ingest.streaming.internal.DataValidationUtil.validateAndParseVariant(DataValidationUtil.java:122)
at net.snowflake.ingest.streaming.internal.ArrowRowBuffer.convertRowToArrow(ArrowRowBuffer.java:539)
at net.snowflake.ingest.streaming.internal.ArrowRowBuffer.addRow(ArrowRowBuffer.java:412)
at net.snowflake.ingest.streaming.internal.AbstractRowBuffer.insertRows(AbstractRowBuffer.java:290)
at net.snowflake.ingest.streaming.internal.SnowflakeStreamingIngestChannelInternal.insertRows(SnowflakeStreamingIngestChannelInternal.java:345)
at net.snowflake.ingest.streaming.internal.SnowflakeStreamingIngestChannelInternal.insertRow(SnowflakeStreamingIngestChannelInternal.java:318)
at snowflake.demo.CDCSimulatorClient.main(CDCSimulatorClient.java:96)
When I tried to build code using Build.bat I see error 🔴
.\Build.bat
C:\dev\tutorials\snowpipe-streaming-cdc\CDCSimulatorApp>javac -cp lib/snowflake-ingest-sdk-1.0.2-beta.7.jar:lib/slf4j-api-2.0.6.jar:lib/slf4j-simple-2.0.6.jar:classes -d classes src/snowflake/utils/*.java
C:\dev\tutorials\snowpipe-streaming-cdc\CDCSimulatorApp>javac -cp lib/snowflake-ingest-sdk-1.0.2-beta.7.jar:lib/slf4j-api-2.0.6.jar:lib/slf4j-simple-2.0.6.jar:classes -d classes src/snowflake/demo/*.java
src\snowflake\demo\CDCSimulatorClient.java:2: error: package snowflake.demo.samples does not exist
import snowflake.demo.samples.CDCEventStreamer;
^
src\snowflake\demo\CDCSimulatorClient.java:12: error: package org.slf4j does not exist
import org.slf4j.Logger;
^
src\snowflake\demo\CDCSimulatorClient.java:13: error: package org.slf4j does not exist
import org.slf4j.LoggerFactory;
^
src\snowflake\demo\CDCSimulatorClient.java:14: error: package org.slf4j.simple does not exist
import org.slf4j.simple.SimpleLogger;
Expected behavior Run_MAX.bat should correctly insert data into table. Build.bat should correctly build .jar file.
Desktop (please complete the following information):
- OS: Windows 10 Enterprise
- Java:
java --version
java 19.0.1 2022-10-18
Java(TM) SE Runtime Environment (build 19.0.1+10-21)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (9 by maintainers)
Thanks for testing and diagnosing this. I have made changes to keep out the commas. Hopefully you won’t find any other issues.