Skip to content
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

Errors connecting to postgres #77

Open
willwill96 opened this issue Nov 12, 2022 · 1 comment
Open

Errors connecting to postgres #77

willwill96 opened this issue Nov 12, 2022 · 1 comment

Comments

@willwill96
Copy link

willwill96 commented Nov 12, 2022

Version: 0.3.3

Expected behavior: Can set up a postgres db for use in postgres-loader

Actual behavior: Having trouble setting up postgres

Steps to reproduce:

I have a repro located here

  1. git clone https://github.com/willwill96/snowplowio-demo.git
  2. docker-compose up

I have been trying to get set up with snowplow using localstack to get a better understanding of the moving pieces, but I am stuck on loading the enriched data into a postgres db. I'm using a pretty vanilla postgres db image.

With the minimal configuration, I see the following error:

snowplow-postgres-loader_1  | org.postgresql.util.PSQLException: ERROR: schema "atomic" does not exist
snowplow-postgres-loader_1  |   Position: 14
snowplow-postgres-loader_1  |   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)

Then I found this SQL statement, supposedly used only for Redshift apps.

I added that SQL statement to the startup of my postgres db, but now I am getting the following error:

snowplow-postgres-loader_1  | org.postgresql.util.PSQLException: The connection attempt failed.
snowplow-postgres-loader_1  |   at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:331)

I'm not sure if this is the proper approach though, because this doc seems to suggest that the creation of DB & schema should be handled by the postgres loader.

Hoping someone may be able to provide some insights in what I might be doing wrong.

@voropaevp
Copy link

Postgres loader doesn't create the schema, but it would create events and other tables. Check docs over here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants