-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bulk ingest failing #110
Comments
Hello, I had the same issue yesterday and after some trial and error I found out that each item needs to have the key-value pair for collection like this on your example:
|
Thanks @gbegkas, this actually works! In my opinion, it should not be necessary to write the collection into the items in the packed json, as the bulk ingest route already is on a collection. Similar to the item creation, where the collection is also not required. |
Collection should be required in an item I think: https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#item-fields |
Hm, the way I read it is that it is required when it is part of a collection, otherwise it is not allowed. But adding an Item (I don't think it makes a difference if via normal |
You're right, if an item is not part of a collection it is ok to not have a collection field but if you're posting items to a collection route then clearly they should have the field specified - even though it should be apparent that they belong to a collection. You could make a pr allowing items posted to a collections route to have the collection field added later maybe? I don't know what people with more stac knowledge would think? |
In pgstac, a collection is required as collection is used both as a foreign key as well as being used as the first level of partitioning. |
I'll try my luck
Totally agree. I think this should be handled by stac-fastapi during ingestion. |
My bulk ingestion fails with the following exception:
The collection
AMEDS_MainCam
does exist and registering items one by one works as well. I useghcr.io/stac-utils/stac-fastapi-pgstac:2.4.11
andghcr.io/stac-utils/pgstac:v0.7.10
.The packed Items are as follows:
Anything I'm doing wrong?
The text was updated successfully, but these errors were encountered: