dbt-labs / dbt-labs/dbt-jobs-as-code

[Feature] Improve yml readability

Open
#112 2 comments 0 reactions 1 assignee Claimed by @b-per View on GitHub
triage
Dominant language
Python
Stars
85
Forks
14
Avg merge
16m
Merged PRs (30d)
5

Description

**Describe the feature**
Structure the yml so that it matches the dbt Cloud UI.

Currently, the generated yml files are sorted alphabetically, so it took me a while to decypher what part of the yaml was responsible for what part of dbt Cloud job configuration. If you structure the yml in a way that it matches the dbt Cloud UI, it is easier to understand.

Example of re-ordered yaml:

```yaml
jobs:
build:
account_id: 1
project_id: 2
environment_id: 3
linked_id: 4

# Job Settings
job_type: scheduled
name: prod - scheduled build
description: Scheduled build job on prod

# Execution settings
run_generate_sources: false
execute_steps:
- dbt build
generate_docs: true

# Triggers
triggers:
github_webhook: false
git_provider_webhook: false
schedule: true
on_merge: false

schedule:
cron: "0 4,9,13 * * 0,1,2,3,4,5,6"

triggers_on_draft_pr: false
job_completion_trigger_condition:

# Advanced settings
custom_environment_variables: []
settings:
threads: 4
target_name: "prod"
execution:
timeout_seconds: 0

dbt_version: # Inherited from environment

deferring_job_definition_id: # we defer to this environment instead
deferring_environment_id: 3
run_compare_changes: false
compare_changes_flags: --select state:modified
```

**Who will this benefit?**
Anyone that wants to match the yaml to the outcome (job configuration) in dbt Cloud.

**Are you interested in contributing this feature?**

Perhaps if you agree that this is a good idea, we could chat about how to go about this

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.