4 ms·
To avoid working with SQL strings.
by ithrow 4y ago
To avoid working with SQL strings.
- hui-zheng 4y agoSQL/jinja like dbt could also avoid working with SQL strings. what would be the better advantage?
- snthpy 4y agoThere is already an integration for dbt: https://github.com/prql/dbt-prql https://github.com/prql/dbt-prql For example {% prql %} from source = {{ source('salesforce', 'in_process') }} derive expected_sales = probability * value join {{ ref('team', 'team_sales') }} [name] group name ( aggregate (sum expected_sales) ) {% endprql %} would appear to dbt as SELECT name, SUM(source.probability * source.value) AS expected_sales FROM {{ source('salesforce', 'in_process') }} AS source JOIN {{ ref('team', 'team_sales') }} USING(name) GROUP BY name dbt is definitely a use case we are very aware of and I am personally very keen on (since I use that in my $dayjob). With some of the ideas in https://github.com/prql/prql/issues/381 https://github.com/prql/prql/issues/381 , I think PRQL could really shine in this area! With your contribution we can get there faster!