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

pypgstac and pgstac database compatibility #123

Closed
drnextgis opened this issue Jun 8, 2022 · 4 comments · Fixed by #125
Closed

pypgstac and pgstac database compatibility #123

drnextgis opened this issue Jun 8, 2022 · 4 comments · Fixed by #125

Comments

@drnextgis
Copy link
Collaborator

I have a doubt regarding compatibility of pypgstac and pgstac database with different versions.

I use pypgstac 0.4.3 to upload data to the pgstac database programmatically:

import asyncio
from pypgstac.load import load_ndjson

dsn = "..."
asyncio.run(
    load_ndjson(file="items.njson", table="items", dsn=dsn, method="insert")
)

Is it safe to use this code to populate v0.6.X pgstac database or pypgstac must be the same version as the database?

I think it makes sense to reflect this information in docs.

@mmcfarland
Copy link
Collaborator

It's generally unsafe to use different versions of pypgstac and pgstac for data loading purposes. The Python code does some pre-processing of items that anticipate specific behavior of pgstac in the database, specifically around de/hydration, so it's best to keep these in sync.

I agree, this should be prominent in the docs.

@bitner
Copy link
Collaborator

bitner commented Jun 13, 2022

Yes, pypgstac and pgstac should be used with the same versions. We should definitely add this to the documentation and probably add a check to the loader to make sure that the loader is compatible with the target database.

@drnextgis
Copy link
Collaborator Author

drnextgis commented Jun 21, 2022

I proposed a fix #125. Anything preventing it from being merged?

@bitner
Copy link
Collaborator

bitner commented Jun 21, 2022

Just time to review it. I'm preparing a few items for a release this week, I'll make sure to review this to try to get it in the release.

bitner added a commit that referenced this issue Jun 22, 2022
bitner added a commit that referenced this issue Jun 22, 2022
* add support for array operators

* update changelog to reflect fix for #123

* add more array tests, make sure cql2_ops table is up-to-date in incremental migration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants