Giter VIP home page Giter VIP logo

Comments (4)

callum-mcdata avatar callum-mcdata commented on July 21, 2024

Proposed implementation

class NonAdditiveDimensionParametersProtocol(Protocol):
    name: str
    window_choice: AggregationType
    window_groupings: List[str]

class MeasureAggregationParametersProtocol(Protocol):
    percentile: Optional[float]
    use_discrete_percentile: bool
    use_approximate_percentile: bool

class MeasureProtocol(Protocol):
    name: str
    agg: AggregationType
    description: Optional[str]
    create_metric: Optional[bool]
    expr: Optional[str]
    agg_params: Optional[MeasureAggregationParametersProtocol]
    non_additive_dimension: Optional[NonAdditiveDimensionParametersProtocol]
    agg_time_dimension: Optional[str]
    checked_agg_time_dimension: TimeDimensionReference
    reference: MeasureReference

from dbt-semantic-interfaces.

callum-mcdata avatar callum-mcdata commented on July 21, 2024

@WilliamDee can I get your 👀 on this to see if it passes the sniff test?

from dbt-semantic-interfaces.

WilliamDee avatar WilliamDee commented on July 21, 2024

@WilliamDee can I get your 👀 on this to see if it passes the sniff test?

@callum-mcdata This looks right! Question I had is do we necessarily need the properties being a protocol as well (ie., MeasureAggregationParametersProtocol)? The answer to that would probably be how flexible we want to be with building these custom classes.

from dbt-semantic-interfaces.

callum-mcdata avatar callum-mcdata commented on July 21, 2024

I think @QMalcolm is probably the best person to answer this. I have no strong opinons one way or another on how we want to implement this 🤔

Additionally I've edited the proposal based on a conversation he and I had offline around whether we want default implementations for property methods. He recommended that we instead define the shape of those properties and core is free to implement them as they see fit.

from dbt-semantic-interfaces.

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.