Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

bigquery-firestore-export: clearing PARTITIONING_FIELD is blocked but the DTS API allows it

Đang mở
#2,985 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend, data-engineering

Hướng nghiên cứu

Bắt đầu trong functions/src/dts.ts, tại guard của PARTITIONING_FIELD và comment của nó, sau đó so sánh implementation extension upstream tương ứng được kế thừa trong commit a34ba233. Reproduce PATCH trên một project thực tế ở location us và xác minh rằng việc xóa field thành công và làm thay đổi một lần chạy tiếp theo; được xem là hoàn tất khi cả hai implementation đều cho phép giá trị rỗng mà không cần error constant đã lỗi thời.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bigquery-firestore-export refuses to clear PARTITIONING_FIELD, but the Data Transfer API allows it.

Setting PARTITIONING_FIELD and later clearing it fails the update with:

Cannot remove partitioning_field from an existing transfer config. The BigQuery Data Transfer API does not support clearing this parameter once it has been set. To change partitioning, you must create a new transfer config with the desired partitioning settings.

The API does support it. Creating a new transfer config is a costly workaround, since run history is stored under the old config ID and does not come with you.

Reproduction

Run against a real project, us location:

  1. Create a scheduled query with partitioning_field: created_at and destination template probe_{run_time|"%H%M%S"}. Two runs produced tables partitioned DAY (field: created_at).
  2. Clear it: PATCH /v1/{name}?updateMask=params with "partitioning_field": "". Returns 200, and a follow-up GET reads it back as "".
  3. Trigger another run. It carries partitioning_field: "", reaches SUCCEEDED, and reports no error.
  4. Compare the destination tables:
probe_152800   DAY (field: created_at)     <- partitioning set
probe_152909   DAY (field: created_at)     <- partitioning set
probe_153056   (none)                      <- after clearing

So the clear is accepted, persists, runs, and changes the output. It is not silently ignored and it does not fail.

The "you cannot un-partition an existing table" concern does not apply here: the destination template gives every run a new time-suffixed table, so nothing is mutated in place.

Where it comes from

The guard and its comment are in functions/src/dts.ts in the upstream extension:

// The BigQuery Data Transfer API does not support clearing this parameter
throw new Error(PARTITIONING_FIELD_REMOVAL_ERROR);

The kit inherited both in a34ba233. The kit and the extension differ only in what happens after the throw, so both are affected.

Suggested fix

Drop the guard and let an empty partitioning_field through the update mask, and remove PARTITIONING_FIELD_REMOVAL_ERROR along with the comment asserting the limitation. Worth confirming against the extension too, since the belief originated there.

Not verified: behaviour in locations other than us, and whether a destination table without a time-suffixed template behaves differently.

Ngôn ngữ chính
TypeScript
Star
978
Fork
433
Merge trung bình
20 giờ 44 phút
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/extensions

Tất cả issue của firebase/extensions

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.