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

Snowflake: Add expression parameter to columns #209

Closed
wants to merge 5 commits into from

Conversation

ipear3
Copy link

@ipear3 ipear3 commented May 10, 2023

Description & motivation

resolves: #140

  • Implements Snowflake External Tables - Ability to add in custom col_expression #140 - extending the snowflake plugin to allow custom expression for virtual columns
  • Adds support for column identifiers in Snowflake external tables. Allowing identifier in addition to name enables aliasing virtual columns within the external table model rather than a subsequent model.

Checklist

  • I have verified that these changes work locally
  • I have updated the README.md (if applicable) <- Not applicable, but updated sample_sources/snowflake.yml
  • I have added an integration test for my fix/feature (if applicable)

ipear3 added 3 commits May 10, 2023 14:06
Allows for an optional `expression` key given under `column`.
When given, column.expression is passed to `{{column_quoted}} {{column.data_type}} as ({{col_expression}}::{{column.data_type}})` instead of
```{%- set col_id = 'value:c' ~ loop.index if is_csv else 'value:' ~ column_quoted -%}
     (case when is_null_value({{col_id}}) or lower({{col_id}}) = 'null' then null else {{col_id}} end)
 ```
@ipear3 ipear3 requested a review from jeremyyeo as a code owner May 10, 2023 18:13
@moseleyi
Copy link

moseleyi commented Jun 7, 2023

This would be such a great addition!

@dweaver33
Copy link

We are eagerly awaiting this PR. This will fix the issue when a source field is named value and you are unable to create the field in Snowflake.

@dweaver33
Copy link

@jeremyyeo, any update on this?

@jeremyyeo
Copy link
Collaborator

Hey folks - we'll try to get this merged this week.

@devdazed
Copy link

Any update on this? we would really love to have this feature included in the package

Copy link

github-actions bot commented Feb 8, 2024

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 8, 2024
@devdazed
Copy link

devdazed commented Feb 8, 2024

yes, what is the hesitation to merging this?

@github-actions github-actions bot removed the Stale label Feb 9, 2024
@ShahNewazKhan
Copy link

are there plans to add tests for this pr?

@kyleburke-meq
Copy link
Contributor

@jeremyyeo is there any update on merging this?

@dataders
Copy link
Collaborator

dataders commented Apr 4, 2024

@ipear3 (and everyone following along). I would like to merge this PR, but it has conflicts with the already merged #211.

I'd welcome anyone to open a new PR based on the commits here that resolve the conflict in a meaningful way

@kyleburke-meq
Copy link
Contributor

@dataders I have resolved the merge conflict here: #275

@dataders
Copy link
Collaborator

dataders commented Apr 5, 2024

closing in favor of #275

@dataders dataders closed this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snowflake External Tables - Ability to add in custom col_expression
8 participants