Giter Club home page Giter Club logo

Comments (9)

clausherther avatar clausherther commented on June 16, 2024

Hi, we don't support Trino b/c we don't have integration testing for it. You can however add a shim to trino-utils to support that for that adapater.

from dbt-expectations.

aezomz avatar aezomz commented on June 16, 2024

@clausherther will i still be able to use dbt expectation regexp? or it have to come from trino-utils directly?

from dbt-expectations.

clausherther avatar clausherther commented on June 16, 2024

You'd add the trino implementation of regexp to the trino-utils package similar to this version of the deduplicate macro from dbt-utils https://github.com/starburstdata/dbt-trino-utils/blob/main/macros/dbt_utils/sql/deduplicate.sql or what they did here for log_natural for T-SQL https://github.com/dbt-msft/tsql-utils/blob/main/macros/dbt_expectations/math/log_natural.sql

In your dbt project, you then need to include the trino-utils package and also update your package path, similar to these examples, so that your project looks for matching macros for your adapter if available. You'd call this with dbt_expectations.regexp() though, so any macro calling regexp will just use the correct version for the adapter. Hope that makes sense.
https://github.com/dbt-msft/tsql-utils#installation-instructions

from dbt-expectations.

aezomz avatar aezomz commented on June 16, 2024

Thank you so much for the detailed explanation. I will check for the similar implementation.

from dbt-expectations.

wjhrdy avatar wjhrdy commented on June 16, 2024

I hacked together a solution that works ontop of the trino_utils package since they haven't responded to the original MR

starburstdata/dbt-trino-utils#21 (comment)

from dbt-expectations.

wjhrdy avatar wjhrdy commented on June 16, 2024

So I fixed this in dbt-trino-utils but they want to now add the fixes to this repo. starburstdata/dbt-trino-utils#35 (comment)

Is that something this repo would accept? It seems like it would be a bunch of work to get the testing apparatus in this repo for trino/starburst and maybe out of the scope of this repo. Please comment on the linked issue above about if you would accept this kind of addition and what you would need if you would accept it. Thanks.

from dbt-expectations.

clausherther avatar clausherther commented on June 16, 2024

Let me think about this. Someone just pushed a PR to dbt-date to add Trino support, and depending on how maintainable that is (i.e. particular if CI works smoothly) we can think about extending this to dbt-expectations.

from dbt-expectations.

clausherther avatar clausherther commented on June 16, 2024

Ah, looks like @damian3031 is also in the mix on the trino repo issue you linked 👍

from dbt-expectations.

wjhrdy avatar wjhrdy commented on June 16, 2024

I realized dbt_expectations is not written in a way that everything can be overridden.

here is an example

starburstdata/dbt-trino-utils#21 (comment)

from dbt-expectations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.