Bulk Upload: tables with foreign keys must be uploaded in dependency order, and nothing says so
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- api, database, documentation
Hướng nghiên cứu
Start with the Bulk Upload documentation and API reference, and review related issue #2362 to determine whether the project wants documentation or pre-streaming validation. Done should either explain parent-first dependency order and unsupported mutual references, or specify a clear 400 response naming referenced tables.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A Bulk Upload loads a CSV into one table with COPY. If that table has a foreign key to another table, every referenced row must already exist, otherwise the whole upload fails and is rolled back. So a set of related tables can only be uploaded one table at a time, in dependency order (parents first), and two tables that reference each other cannot be bulk-uploaded at all. Raised in a comment on #2362 (2026-07-06).
Nothing tells a user this today: the error is the foreign-key violation from Postgres, at the end of a possibly long upload.
Options:
- Document it in the Bulk Upload docs and the API reference: upload in dependency order. Cheapest, and covers the common case.
- Check before streaming: look up the table's foreign keys and answer with a clear 400 that names the referenced table(s), before the body is consumed. That needs no data check, only the catalog.
- Deferred constraints: if the foreign keys were created
DEFERRABLE, the upload transaction couldSET CONSTRAINTS ALL DEFERRED. That only helps within one transaction, so it would not by itself solve uploads of several tables, which arrive as separate requests.
Related: #2362.
- Ngôn ngữ chính
- Python
- Star
- 65
- Fork
- 28
- Merge trung bình
- 4 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenEnergyPlatform/oeplatform
-
API bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenEnergyPlatform/oeplatform#2580 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Redesign the database page to support dataset creationCó thể đã có người làm @bmlancien đã nhận 4 ngày trước. Đang mởdata-upload
OpenEnergyPlatform/oeplatform#2762 · 1 bình luận · 3 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Improve navigation links in Core Features and Integrated WorkflowsCó thể đã có người làm @tomi-rli đã nhận 19 ngày trước. Đang mởHomepage
OpenEnergyPlatform/oeplatform#2746 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Enhance the new OEP homepageCó thể đã có người làm @jh-RLI đã nhận 19 ngày trước. Đang mởHomepage
OpenEnergyPlatform/oeplatform#2745 · 2 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Display child nodes in the OEO Viewer Graph ViewCó thể đã có người làm @jh-RLI đã nhận 23 ngày trước. Đang mởoeo viewer
OpenEnergyPlatform/oeplatform#2739 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của OpenEnergyPlatform/oeplatform
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Harden tools/pr_threads.sh: pass all printed thread fields through the deterministic sanitizerĐang mởarea:cli area:security enhancement priority:medium size:small
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
RonaldHensbergen/composable-data-stack#1338 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:stdlib effort:S impact:med platform:linux type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated endpoint-dead needs-curation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
almanac-data/climate-almanac#139 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
UKGovernmentBEIS/inspect_ai#6695 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày