Allow steps to loop through array of variables
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
The issue names no files, tests, or entry points. Start by reviewing how playbooks, steps, and templated variables are currently represented, then determine how loop variables should apply across queries and steps. Done means a playbook can iterate over the country and schema pairs while preserving the requested non-looped steps.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
At @Werkspot we are active in multiple countries. Each country has exactly the same database structure. We load each country in a separate schema in Redshift
I would like to create a playbook where i can run steps in a loop with different variables.
I was thinking about something like this: (i know i can put multiple Queries in one file but want to make clear what i was thinking about)
loop:
variables:
- country: nl
schema: raw_data_nl
- country: it
schema: raw_data_it
steps:
# remove old tmp table (if it exists) so we are sure we are starting fresh
- name: Remove tmp table
loop: false
queries:
- name: remove tmp table
file: 01.remove_tmp.sql
- name: create tmp table
loop: false
queries:
- name: create table
file: 02.01.first_subscription.sql
loop: false
- name: Manipulate data per country
loop: true # since loop contains variables there is no need to also put the `template` option here, the loop should overwrite this to true
queries:
- name: Create table A
file: 03.01.create_table_a.sql
- name: Create table B
file: 03.02.create_table_b.sql
- name: combine table A & B per country
loop: true
queries:
- name: combine table A & B
file: 04.combine_tables_and_insert_into_tmp.sql
- name: Replace old data with new data
loop: false
queries:
- name: Delete old table
file: 05.01.delete_old_table.sql
- name: Rename tmp
file: 05.02.rename_tmp.sql
- Ngôn ngữ chính
- Go
- Star
- 81
- Fork
- 15
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 snowplow/sql-runner
-
Update to aws-sdk-go-v2Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
snowplow/sql-runner#218 · 1 bình luận ·
-
Implement a loggerĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
snowplow/sql-runner#194 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
snowplow/sql-runner#193 · 1 bình luận ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
snowplow/sql-runner#186 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
snowplow/sql-runner#185 ·
Tất cả issue của snowplow/sql-runner
Issue tương tự
-
test(fabric): load the TestLoad fixture through config.Service instead of a raw koanf decodeĐang mởcleanup hacktoberfest priority: low skill: good first issue testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
hyperledger-labs/fabric-smart-client#2197 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NTR: [tRNA kinase activity]Đang mởNew term request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
geneontology/go-ontology#32791 ·
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 69/100
aws/amazon-ecs-agent#5177 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
release-followup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày