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

Removed quotes from config_col macro. #246

Closed
wants to merge 1 commit into from

Conversation

wabu
Copy link

@wabu wabu commented Nov 26, 2024

Summary

Removed qoutes from config_col macro to be able to define partition transformations.

Description

As described in #201, when using transformations in partition_by statements, dbt-dremio currently raises an error which can be fixed by removing the default quoting.

Test Results

With the changes, I can now use transformation on partition_by columns.

{{ config(
    materialized='reflection',
    reflection_type='raw',
    partition_by=['month("date_col")'],
) }}
-- depends on {{ ref('view_definition') }}

You however have to use manually quote columns with irregular chars.

Changelog

  • Added a summary of what this PR accomplishes to CHANGELOG.md

Related Issue

#201

This is required to be able to define partition transformations for
reflections, like `bucket(10, id)`.
@bcmeireles bcmeireles changed the title Removed qoutes from config_col macro. Removed quotes from config_col macro. Nov 28, 2024
@bcmeireles bcmeireles self-requested a review December 4, 2024 13:59
@bcmeireles
Copy link
Contributor

Hi @wabu,
Thanks for the contribution!
We just need some more information regarding this, specifically, does this change have the potential to break anything user-generated created before this change was introduced? And could you write some test cases for it?
We now have a workflow to run tests that was introduced after this PR was created so you will need to rebase.

Thank you :)

@bcmeireles bcmeireles linked an issue Dec 4, 2024 that may be closed by this pull request
@bcmeireles
Copy link
Contributor

Closing this as reflections have been reworked in #256

@bcmeireles bcmeireles closed this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Partition by should not quote the items
2 participants