Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Passing preserve_quotes to dbt-osmosis seems to do nothing #203

Open
wahlrkr opened this issue Jan 21, 2025 · 1 comment
Open

[bug] Passing preserve_quotes to dbt-osmosis seems to do nothing #203

wahlrkr opened this issue Jan 21, 2025 · 1 comment
Labels
invalid This doesn't seem right

Comments

@wahlrkr
Copy link

wahlrkr commented Jan 21, 2025

Hi

requested feature of preserving quotes was acknowledged here #127 but currently it seems, that the config flag of preserve_quotes does nothing. I tried it with both false and true but running dbt-osmosis yaml refactor still gives exactly the same results i.e. still cleans up the quotes automatically.

Version

1.1.9

dbt-osmosis config

vars:
  dbt-osmosis:
    yaml_settings:
      indent: 2
      explicit_start: true
      preserve_quotes: true

Original

version: 2

models:
  - name: social_media_v1__fbpage_page_daily
    latest_version: 1
    versions:
      - v: 1
    columns:
      - name: platform
        description: 'Hard coded source'
        data_type: varchar

How it is

---
version: 2

models:
  - name: social_media_v1__fbpage_page_daily
    latest_version: 1
    versions:
      - v: 1
    columns:
      - name: platform
        description: Hard coded source
        data_type: varchar

How it should be

Like the "original" without no quotation changes.

Thanks 🙂

@z3z1ma
Copy link
Owner

z3z1ma commented Jan 29, 2025

Its working for me using this as an example. These are all set directly on the ruamel YAML round trip serializer instance. I tested modifying the preserve_quotes abck and forth and it worked as expected so having trouble reproducing.

vars:
  dbt-osmosis:
    yaml_settings:
      map_indent: 2
      sequence_indent: 4
      brace_single_entry_mapping_in_flow_sequence: true
      explicit_start: true
      preserve_quotes: true

@z3z1ma z3z1ma added the invalid This doesn't seem right label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants