Git Product home page Git Product logo

Comments (8)

z3z1ma avatar z3z1ma commented on May 19, 2024 1

Wanted to get some movement here:

It also tried to look for ephemeral models

What is the exact output? With a verbose flag, what it actually says is something like "Skipping ephemeral model IMD_MONDAY_SCHEDULING_HISTORY not manifested in database". It doesn't mean its looking for ephemeral, just being very verbose.

With the folder parser, dbt_path pulls in all files since it cannot resolve schema except for in source files and even then only if the source file is not using jinja for its schema: key.
The manifest parser on the other hand is able to use schema to filter the subset of models early.

So the no-op you are experiencing almost has to come from the dbt_schema or dbt_database arguments not matching up to what's in the manifest.json
Very likely that at least. We need an answer to that before we can rule this an issue.

Best way might be to control-F in a manifest artifact and inspect the schema field as well as the database field in pretty much any model

from dbt-metabase.

z3z1ma avatar z3z1ma commented on May 19, 2024

Can you try adding --verbose to the command and seeing what happens?
I would only imagine the command terminating if it found no objects to loop through matching your supplied dbt_prod schema/database. We can tell more with the flag though.

from dbt-metabase.

mmmatthew avatar mmmatthew commented on May 19, 2024

Thanks for the answer! Indeed, it didn't find the models in dbt_prod. Surprisingly:

  • It also tried to look for ephemeral models
  • If I run the same command but with --dbt_path instead of --dbt_manifest_path, it works fine.

from dbt-metabase.

mmmatthew avatar mmmatthew commented on May 19, 2024

Thank you Alexander for your assistance! Indeed, the problem appears to be with the schema names. FYI, I am using BigQuery as a data store. It seems like in the build_metadata_lookups() method falls back to using public, even though the schema is defined in dbt. I was able get the synchronization to work by fixing schema_name to 'PUBLIC' in export_model(). The resolution of foreign keys still doesn't work.

As a next step I will check what Metabase is returning to see if maybe the schema isn't being identified correctly.

from dbt-metabase.

mmmatthew avatar mmmatthew commented on May 19, 2024

I can confirm that metabase is returning null for table schemas, but in dbt the schema is defined as dbt_prod

from dbt-metabase.

z3z1ma avatar z3z1ma commented on May 19, 2024

Ahh I think its coming back to me @mmmatthew,
Doesn't metabase api return dataset as a key in the json response if using bigquery instead of schema?
Would it be possible for you to confirm the network response from hitting this endpoint?

https://your_metabase_host/api/table/{id}

where id is the id of a table

you can find table ids here pretty easily

https://your_metabase_host/reference/databases/2/tables
where 2 is the id of whatever dataset has the table

If this is the case, it might be an easy fix.

from dbt-metabase.

mmmatthew avatar mmmatthew commented on May 19, 2024

We're getting closer! I found both the project_id (corresponds to dbt_database) and dataset_id (corresponds to dbt_schema) in the metabase responses, under ./details when hitting the api/database/{id}/metadata endpoint or under ./db/details when hitting the api/table/{id} endpoint.

{
...
 "details": {
        "use-service-account": null,
        "dataset-id": "dbt_prod",
        "service-account-json": "**MetabasePass**",
        "use-jvm-timezone": false,
        "include-user-id-and-hash": false,
        "ssl": true,
        "project-id": "bigquery_project",
        "let-user-control-scheduling": true
    },
...
}
`

from dbt-metabase.

mmmatthew avatar mmmatthew commented on May 19, 2024

I would be happy to make a PR for this, btw, once we agree on how to fix it.

from dbt-metabase.

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.