PostgreSQL Connector - Version 1.0.34 Airbyte - Ve...
# replication-troubleshooting
g
PostgreSQL Connector - Version 1.0.34 Airbyte - Version 0.40.26 Hi folks! I've just upgrade Airbyte to version 0.40.26 and PostgreSQL Connector to version 1.0.34 and since then we are getting the following error message:
Copy code
Position: 243,externalMessage=Something went wrong in the connector. See the logs for more details.,metadata=io.airbyte.config.Metadata@567f3621[additionalProperties={attemptNumber=0, jobId=207613, from_trace_message=true, connector_command=read}],stacktrace=org.postgresql.util.PSQLException: ERROR: syntax error at or near "-"
  Position: 243
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:329)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:315)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:291)
	at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:243)
	at com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:110)
	at com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java)
	at io.airbyte.integrations.source.postgres.PostgresSource.lambda$verifyCursorColumnValues$12(PostgresSource.java:532)
	at io.airbyte.db.jdbc.DefaultJdbcDatabase.bufferedResultSetQuery(DefaultJdbcDatabase.java:55)
	at io.airbyte.integrations.source.postgres.PostgresSource.verifyCursorColumnValues(PostgresSource.java:532)
	at io.airbyte.integrations.source.postgres.PostgresSource.verifyCursorColumnValues(PostgresSource.java:78)
πŸ‘€ 1
I found a similar thread here. The solution as the same: downgrade to 1.0.30. Could anybody help me? Thanks!
e
I am running 0.40.26 with source postgres 1.0.34, and it works fine. Maybe it’s related to certain data column type? My experience with airbyte is on both ends of spectrums, either works great or gets unfriendly error. When I get error, I had to find a workaround, always, and wait for next version to give it another try.
g
Hi Eric! Thanks! I suspect about the name of schema. The devs declared the name of datbase schema with
-
(hyphen) instead
_
(underscore). I didn't see any problem about this in source postgresql 1.0.30...
I will try to make a diff to find the problem
e
Ahh. That maybe it. I never use β€œ-” on db schema or db table or db column name.
g
Yes... I agree... It is not a good practice. But sometimes we don't have the control of all databases and schemas. We have hundreds of databases an thousands of developers...
I send any news if I found something
e
Good luck. 🀞
g
e
Thanks @Gleber Baptistella. Did you implement a workaround by not having hyphen?
g
I'm actually using connector version 1.0.30...
πŸ™ 1
s
Hey folks, thanks for all your research. It's true that postgres identifiers should not contain hyphens, however it may be possible for Airbyte to escape the character as it did in previous versions. Leaving a comment and thumbs up on the github issue linked by @Gleber Baptistella would be really helpful for getting it resolved.
g
Hey @Sunny Hashmi (Airbyte)! Thank you for your answer! I've just checked the repository and it seems the query was moved to class
io.airbyte.integrations.source.postgres.PostgresQueryUtils
with the name
NULL_CURSOR_VALUE_WITH_SCHEMA_QUERY
and it is already have the scape character. I think this issue was fixed at version 0.40.28 here too, but the version 1.0.36 of connector doesn't have this fix.
I just checked and version 1.0.38 fixes the issue and is up for upgrade!
πŸ™ŒπŸ½ 1
s
Fantastic to hear @Gleber Baptistella! I'm going to leave a note and close out the github issue, feel free to leave a comment there if you think it should be re-opened.
g
Thanks, @Sunny Hashmi (Airbyte)