feat(pipelines): Support setting ELT_WRITE_DISPOSITION value in Ansible playbook#164
Conversation
WalkthroughThe changes introduce write disposition configuration to the ELT workflow. An environment variable Changes
Poem
Pre-merge checks✅ Passed checks (3 passed)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
infra/ansible-docker/playbooks/elt/group_vars/elt.yml (1)
28-32: Consider adding an inline comment about the temporary nature of this configuration.The
write_disposition: "replace"configuration is applied only to the opralogweb source, which aligns with the PR objectives. However, since the PR description notes this is a temporary measure pending issue #138, adding a brief comment would help future maintainers understand the rationale.Consider adding an inline comment to clarify the temporary nature:
- name: opralogweb hour: 2 minute: 11 dbt_args: "--select '+models/operations' --exclude '+models/operations/power_consumption.sql'" + # TODO: Remove write_disposition after issue #138 is implemented write_disposition: "replace"
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (2)
infra/ansible-docker/playbooks/elt/elt_cron_tasks.yml(1 hunks)infra/ansible-docker/playbooks/elt/group_vars/elt.yml(1 hunks)
🔇 Additional comments (2)
infra/ansible-docker/playbooks/elt/group_vars/elt.yml (1)
14-42: Overall structure is sound and maintains backwards compatibility.The changes correctly introduce per-warehouse write disposition configuration. The implementation:
- Uses sensible defaults (empty string) for sources without explicit configuration
- Scopes the "replace" mode specifically to opralogweb as per PR objectives
- Maintains backwards compatibility with existing sources
infra/ansible-docker/playbooks/elt/elt_cron_tasks.yml (1)
11-11: Verification confirmed—ELT_WRITE_DISPOSITION is correctly consumed by the downstream script.The environment variable is properly declared in the Jinja2 template at
infra/ansible-docker/playbooks/elt/templates/cron/elt_task.sh.j2(line 7) and consumed with correct conditional handling (lines 56–58). The variable is read and used to conditionally set a--write-dispositionflag for the uv command. The empty-string default in the playbook ensures backwards compatibility by making the flag optional.
Summary
The Ansible playbook can now set the mode for write_disposition in the ELT cron jobs. For now Opralog is set to replace to ensure everything is fresh until #138 is implemented.
Refs #138
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.