-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\u0000 cannot be converted to text - Postgres Destination #3476
Comments
This prevents me from syncing Twilio into Postgres:
|
This also prevents me from syncing data from Mysql to Postgres |
Hi everyone, pulling this into the current sprint. Apologies for missing it! |
Hey @sherifnada and @DoNotPanicUA, it looks like a regression made this bug happen again according to a post on our forum |
Hi @alafanechere, |
Potentially we have an issue with byte fields. |
Hi @DoNotPanicUA
And here's the source_catalog.json:
What might help to track this down: The error does not pop up if we use full-refresh->overwrite as sync mode. So maybe this is related to the datetypes of the cursor and primary keys ? cheers and thanks for looking into this! |
Hi @jstettnerbc, |
@jstettnerbc, |
@DoNotPanicUA thanks for looking into this. Actually we added the field specifically to be used as cursor. I'm absolutely no expert on Microsoft-SQLServer/TransactSQL, but at first glance this look like the right way to go on the source DB side, doesnt it? But we'll check on our side how we can fix this or whether we can add another field to be used as cursor. |
@jstettnerbc P.S. One more thing. The problem is not in the destination. We store the biggest cursor value in a small system database. And yeah, this DB is Postgres 😄 I will close this ticket and create a new one with a proper description. |
@sherifnada @alafanechere I've finished the investigation of the reported issue and created the new issue for it #13814. |
Logs
2021-05-18 23:43:30 INFO (/tmp/workspace/4/0) DefaultAirbyteStreamFactory(lambda$create$0):73 - 2021-05-18 23:43:30 �[32mINFO�[m i.a.i.s.j.AbstractJdbcSource(lambda$createReadIterator$8):308 - {} - Reading stream processes. Records read: 160000
2021-05-18 23:43:32 INFO (/tmp/workspace/4/0) DefaultAirbyteStreamFactory(lambda$create$0):73 - 2021-05-18 23:43:32 �[32mINFO�[m i.a.i.s.j.StateDecoratingIterator(computeNext):79 - {} - State Report: stream name: AirbyteStreamNameNamespacePair{name='processes', namespace='labtech'}, original cursor field: null, original cursor null, cursor field: Last_date, new cursor: 2021-05-18T23:42:27Z
2021-05-18 23:43:32 INFO (/tmp/workspace/4/0) DefaultAirbyteStreamFactory(lambda$create$0):73 - 2021-05-18 23:43:32 �[32mINFO�[m i.a.i.s.j.AbstractJdbcSource(lambda$queryTableFullRefresh$29):523 - {} - Preparing query for table: software
2021-05-18 23:43:32 INFO (/tmp/workspace/4/0) DefaultAirbyteStreamFactory(lambda$create$0):73 - 2021-05-18 23:43:32 �[32mINFO�[m i.a.i.s.j.AbstractJdbcSource(lambda$queryTableFullRefresh$29):528 - {} - Executing query for table: software
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.b.FailureTrackingAirbyteMessageConsumer(close):77 - {} - hasFailed: true.
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[1;31mERROR�[m i.a.i.d.b.BufferedStreamConsumer(close):187 - {} - executing on failed close procedure.
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):203 - {} - Cleaning tmp tables in destination started for 12 streams
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-h_processes. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_h_processes
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-processes. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_processes
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-software. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_software
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_alerts. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_alerts
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_clients. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_clients
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_computers. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_computers
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_computerusage. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_computerusage
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_detectedroles. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_detectedroles
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_locations. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_locations
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_networkadapters. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_networkadapters
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_printers. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_printers
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):207 - {} - Cleaning tmp table in destination started for stream automate-v_processors. schema labtech, tmp table name: _airbyte_1621380413832__airbyte_raw_automate_v_processors
2021-05-18 23:43:33 INFO (/tmp/workspace/4/0) LineGobbler(voidCall):69 - 2021-05-18 23:43:33 �[32mINFO�[m i.a.i.d.j.JdbcBufferedConsumerFactory(lambda$onCloseFunction$3):212 - {} - Cleaning tmp tables in destination completed.
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - Exception in thread "main" java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: unsupported Unicode escape sequence
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - Detail: \u0000 cannot be converted to text.
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - Where: JSON data, line 1: ... Menu\Programs" -g="Wall Control"","Version":...
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - COPY _airbyte_1621380413832__airbyte_raw_automate_software, line 115, column _airbyte_data: "{"AppID":127456301,"ComputerID":2667,"Name":"Wall Control","Location":"C:\Program Files (x86)\Wall..."
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.destination.jdbc.DefaultSqlOperations.lambda$insertRecords$0(DefaultSqlOperations.java:97)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.db.jdbc.DefaultJdbcDatabase.execute(DefaultJdbcDatabase.java:61)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.destination.jdbc.DefaultSqlOperations.insertRecords(DefaultSqlOperations.java:86)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.destination.jdbc.JdbcBufferedConsumerFactory.lambda$recordWriterFunction$2(JdbcBufferedConsumerFactory.java:171)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.destination.buffered_stream_consumer.BufferedStreamConsumer.flushQueueToDestination(BufferedStreamConsumer.java:163)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.destination.buffered_stream_consumer.BufferedStreamConsumer.acceptTracked(BufferedStreamConsumer.java:145)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.base.FailureTrackingAirbyteMessageConsumer.accept(FailureTrackingAirbyteMessageConsumer.java:66)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.base.IntegrationRunner.consumeWriteStream(IntegrationRunner.java:132)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:113)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.destination.postgres.PostgresDestination.main(PostgresDestination.java:84)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - Caused by: org.postgresql.util.PSQLException: ERROR: unsupported Unicode escape sequence
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - Detail: \u0000 cannot be converted to text.
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - Where: JSON data, line 1: ... Menu\Programs" -g="Wall Control"","Version":...
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - COPY _airbyte_1621380413832__airbyte_raw_automate_software, line 115, column _airbyte_data: "{"AppID":127456301,"ComputerID":2667,"Name":"Wall Control","Location":"C:\Program Files (x86)\Wall..."
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1212)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at org.postgresql.core.v3.QueryExecutorImpl.endCopy(QueryExecutorImpl.java:1017)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at org.postgresql.core.v3.CopyInImpl.endCopy(CopyInImpl.java:49)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:185)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:160)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - at io.airbyte.integrations.destination.jdbc.DefaultSqlOperations.lambda$insertRecords$0(DefaultSqlOperations.java:95)
2021-05-18 23:43:33 ERROR (/tmp/workspace/4/0) LineGobbler(voidCall):69 - ... 9 more
Steps to Reproduce
2.Destination Postgres
Severity of the bug for you
Medium
Airbyte Version
0.22.3-alpha
Connector Version (if applicable)
source-mysql 0.3.0
destination-postgres 0.3.3
Additional context
I believe we just need a handler for NULL values
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: