starburstdata / dbt-trino-utils Goto Github PK
View Code? Open in Web Editor NEWUtility functions for dbt projects running on Trino
License: Apache License 2.0
Utility functions for dbt projects running on Trino
License: Apache License 2.0
seems that those macros could not used with trino. Single quote should be double quote ?
Do we need to override this ?
https://github.com/dbt-labs/dbt-utils/blob/main/macros/generic_tests/equality.sql#L67
https://github.com/dbt-labs/dbt-utils/blob/main/macros/generic_tests/equality.sql#L69
Add dbt metrics package support
I just tried to use dbt metrics, but it fails with trino, I think because of the following:
There's a dateadd
in the metric_date_spine
macro in the that trino doesn't recognize (it's date_add
for trino).
Would it be an option to use this package to reimplement the macros necessary to run dbt metrics?
Overwrite the macros myself
People who want to use dbt metrics with trino.
Some of the tests for dbt-metrics are disabled:
Fix and enable these tests. Add Trino shims if needed.
Upgrade dbt-trino-utils to v1.0.0 https://github.com/dbt-labs/dbt-utils/releases/tag/1.0.0-rc1
Add dbt-date package support
Patch regexp_instr for Trino, so that its compatible in dbt-expectations
Reference, of why am here.
calogica/dbt-expectations#243
Is your feature request related to a problem? Please describe.
Lets support regex expectation for Trino on
https://github.com/calogica/dbt-expectations/blob/b21b13f020f5df2c90885d0715a2e713d1204700/macros/regex/regexp_instr.sql
Describe the solution you'd like
We can use this,
https://trino.io/docs/current/functions/regexp.html
regexp_position(string, pattern, start, occurrence) โ integer
Lets group similar implementation like https://github.com/dbt-msft/tsql-utils/tree/main/macros/dbt_expectations ?
Add test matrix for different dbt versions in CI/CD
Add release section in readme, as it is missing.
details here: #28 (comment)
Currently, most of the tests for dbt-date are disabled, as Trino-specific implementations for macros are needed:
There is small bug in macros/dbt_utils/sql/deduplicate.sql
:
dbt-utils
is not adequate to our implementation of deduplicate
macro, because rn
column is leaking due to lack of natural join in trino (trinodb/trino#14455).rn
won't be leaking.Fix dbt-project-evaluator, some models and seeds are overridden at integration-tests level, but should be at package level
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.