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

Adding ability to install re_data for Greenplum database #102

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

mrprigun
Copy link
Contributor

What

How

Fixed related Jinja SQL templates

@@ -6,7 +6,7 @@ with median_value as (
column_name,
metric,
interval_length_sec,
avg(value) {% if target.type != 'postgres' %} over(partition by {{ columns_to_group_by }}) {% endif %} as last_avg,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To not repeat and make it more extensible, I think macro with those 2 db would be nice. So that we could write something like this:

{% if target.type in postgres_type_db() %}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, sounds reasonable. Do you have any recommendations where to place this macro?
For me macros/db/postgres is the best folder for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@mateuszklimek
Copy link
Member

@mrprigun Thanks for the PR! I've added one comment regarding implementation (suggestion on making it more extensible for the future). I believe greenplum is not the only one db which has postgres like engine. I know timescale is similar.

1 similar comment
@mateuszklimek
Copy link
Member

@mrprigun Thanks for the PR! I've added one comment regarding implementation (suggestion on making it more extensible for the future). I believe greenplum is not the only one db which has postgres like engine. I know timescale is similar.

@mateuszklimek mateuszklimek merged commit 90935a9 into re-data:main Oct 26, 2022
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.

None yet

2 participants