dianfu / pyflink-faq

Frequently Asked Questions about PyFlink
Apache License 2.0
24 stars 5 forks source link

Issues with testing sink #4

Open tierino opened 3 months ago

tierino commented 3 months ago

Hi there, I'm trying to follow your example but having trouble with the test sink for the Table API tests.

At first I was seeing:

Could not find any factory for identifier 'test-sink' that implements 'org.apache.flink.table.factories.DynamicTableFactory' in the classpath.

After adding the the dependency for the testing JAR listed here using table_env.get_config().set("pipeline.jars", "<path_to_jar>") the test fails later when trying to receive results:

py4j.protocol.Py4JJavaError: An error occurred while calling z:org.apache.flink.table.utils.TestingSinks$RowCollector.retractResults.
: java.lang.AssertionError: Received retracted rows which have not been accumulated.

I am using apache-flink 1.20.0 so I tried using version 1.20.0 of the JAR file but I'm seeing the same error, I've also tried 1.19.1. Any ideas? Is there a different JAR file I should be depending on?

Thanks :)