dbt-re-data icon indicating copy to clipboard operation
dbt-re-data copied to clipboard

[BUG] Unable to install re_data for Greenplum database

Open mrprigun opened this issue 3 years ago • 0 comments

Describe the bug There is an error when running the command dbt run --models package:re_data

Expected behavior re_data models installed for Greenplum database.

To Reproduce Steps to reproduce the behavior:

  • Configure dbt project for Greenplum database
  • Run command dbt run --models package:re_data

Screenshots image

Logs and additional context

...
14:27:46 Completed with 1 error and 0 warnings:
14:27:46  
14:27:46  Database Error in model re_data_last_stats (models/metrics/for_anomalies/re_data_last_stats.sql)
14:27:46    column "re_data_base_metrics.value" must appear in the GROUP BY clause or be used in an aggregate function
14:27:46    LINE 12:         avg(value)  over(partition by table_name, column_nam...
14:27:46                         ^
14:27:46    compiled SQL at target/run/re_data/models/metrics/for_anomalies/re_data_last_stats.sql
...

There're four places hardcoded for PostgreSQL database in models/metrics/for_anomalies/re_data_last_stats.sql file.

image

Greenplum is based on PostgreSQL 9.4 and has the same syntax. So it should be changed to something like this:

image

mrprigun avatar Oct 24 '22 11:10 mrprigun