Git Product home page Git Product logo

Comments (10)

matthewwardrop avatar matthewwardrop commented on August 18, 2024 1

@naoyak Hmmm... looking at this more closely, this failure was "designed", in that it didn't seem sensible to me at the time to have inconsistently nested definitions, which could create ambiguous definitions. In this case, why not just suppress the database nesting, and instead have:

data_environments:
    env1:
        presto:
            protocol: presto
            host: localhost
            port: 9999
            catalog: silver
            schema: default
        hive:
            protocol: hiveserver2
            host: localhost
            port: 3333
            schema: default
            driver: pyhive
        metastore:
            host: localhost
            port: 5555

If metastore is not a duct, then just create a new nesting for omniduct or services, and pass only the subset of configurations to Omniduct, like:

data_environments:
    env1:
        services:
             databases: ....
        metastore:
             ....

from omniduct.

naoyak avatar naoyak commented on August 18, 2024 1

I'm going to reopen this for discussion - if we can provide a simple patch which handles "empty" nesting levels gracefully, would it be acceptable to re-enable the handling? What do you think @matthewwardrop?

Again for context, we have some production libraries which currently pin an old version of Omniduct in order to deal with a specific legacy YAML config on the servers. cc @OneRaynyDay

from omniduct.

matthewwardrop avatar matthewwardrop commented on August 18, 2024 1

@naoyak @OneRaynyDay I've included a fix for this in Omniduct 1.1.9 (929a39a). It's a more generous parser that traverses the configuration looking for any potential Duct configurations, and so allows configurations like the one you provided. It's also backward compatible with any configurations for Omniduct <= 1.1.8. I'll close this issue out; but feel free to reopen if this doesn't solve your issues.

from omniduct.

matthewwardrop avatar matthewwardrop commented on August 18, 2024

Roger that... I'll look into this tonight. Thanks for the report!

from omniduct.

naoyak avatar naoyak commented on August 18, 2024

Thanks @matthewwardrop! For context, I think this is happening because the envs defined in the YAML config have a mix of Ducts (Hive, Presto) and unrelated stuff which doesn't follow the convention expected by Omniduct. I suppose this is something that could be handled gracefully, e.g. by ignoring sections which don't look like what's expected.

from omniduct.

naoyak avatar naoyak commented on August 18, 2024

@matthewwardrop thanks for checking it out! Yeah, you're probably right about this. It seems to be as simple as either tweaking the YAML format or tweaking the read-in logic, maybe even a one-liner. It's on the radar internally and should be fixed there.

from omniduct.

matthewwardrop avatar matthewwardrop commented on August 18, 2024

Thanks for reporting in @naoyak.

from omniduct.

matthewwardrop avatar matthewwardrop commented on August 18, 2024

By "empty" do you mean levels which do not have a "protocol" field? I think I'd even be willing to change the parser to just check if there is a "protocol" field at any level, and if so, interpret that as a Duct configuration. Would that work for you?

from omniduct.

naoyak avatar naoyak commented on August 18, 2024

@matthewwardrop I think that would work! If Omniduct simply ignores entries w/o a protocol entry instead of throwing the exception, it would likely accommodate our usage.

@OneRaynyDay can you confirm?

from omniduct.

naoyak avatar naoyak commented on August 18, 2024

Thanks @matthewwardrop! This looks great, we'll go with 1.1.9 going forward and hopefully this issue will be resolved for good on our end.

from omniduct.

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.