-
Notifications
You must be signed in to change notification settings - Fork 15
pgstac_reader NDJSON export #97
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, though some linting issues.
IMO, it'd be better to have a test that exercises the new format="ndjson" option than testing _write_ndjson directly.
|
Agreed, though offline I'm chatting with @kylebarron on some more changes. I think this PR isn't finished. For context, I'm trying to revive the OpenPC geoparquet exports, and Kyle I think wants to switch to using Arrow instead of using geopandas to write the parquet files. This NDJSON export in the end might be just an internal intermediate step that isn't exposed to clients. The reason why the geoparquet export broke is:
I'll eventually consume this change in PCTasks when I revive the export. |
|
@bitner 👀 |
| import pystac | ||
| import shapely.wkb | ||
| import tqdm.auto | ||
| from tenacity import before_sleep_log, retry, stop_after_attempt, wait_fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a new dependency? I don't see it in
stac-geoparquet/pyproject.toml
Lines 13 to 27 in 57229c0
| dependencies = [ | |
| "ciso8601", | |
| "deltalake", | |
| "geopandas", | |
| "packaging", | |
| "pandas", | |
| # Needed for RecordBatch.append_column | |
| # Below 19 b/c https://github.com/apache/arrow/issues/45283 | |
| "pyarrow>=16,<19", | |
| "pyproj", | |
| "pystac", | |
| "shapely", | |
| "orjson", | |
| 'typing_extensions; python_version < "3.11"', | |
| ] |
|
@ghidalgo3 Let me mess around with a few things, we can definitely make this more streamable / memory friendly on the pg access side. |
|
didn't quite get there today, but I'll have something that cleans a lot of the postgres stuff up tomorrow |
This is an intermediate step necessary to rewrite the in-memory processing step to use Arrow.