Coder Social home page Coder Social logo

How to use SqlQueriesSource about datahub HOT 3 CLOSED

sunrutcon avatar sunrutcon commented on June 18, 2024
How to use SqlQueriesSource

from datahub.

Comments (3)

wu-johnson avatar wu-johnson commented on June 18, 2024

follow this doc, https://datahubproject.io/docs/next/generated/ingestion/sources/sql-queries/#cli-based-ingestion. datahub ingest successed, but no table lineage or column lineage in the web ui.
eg:

image image

and sql file like this
{"query": "insert into datahub.t_customer_country_city_rank ( ca_country ,ca_city ,cnt ,rid ) select ca_country ,ca_city ,count(1) as cnt ,1 as rid from datahub.t_customer_address group by ca_country,ca_city", "user": "test", "upstream_ tables": ["datahub.t_customer_address"]}

config file like this
datahub_api: # Only necessary if using a non-DataHub sink, e.g. the file sink
server: http://localhost:8080
timeout_sec: 60
source:
type: sql-queries
config:
platform: "mysql"
default_db: "datahub"
query_file: "/tmp/sql-ingest-sample.json"
reporting:

  • type: datahub
    config:
    report_recipe: false

after success run with cmd: datahub ingest -c sql-ingest-recipe.yaml. in the webui do not have the table lineage or column lineage
image

from datahub.

sunrutcon avatar sunrutcon commented on June 18, 2024

So you need running web app to use this feature?
Is it possible to generate sql column level lineage with just importing SqlQueriesSource from the module and do it offilne?

from datahub.

hsheth2 avatar hsheth2 commented on June 18, 2024

The docs are more up to date if you select "next" in the version selector

This source needs access to datahub's backend in order to fetch schema information for tables - otherwise the accuracy will be lower.

There was a bug with our processing of certain insert into statements, so that query should generate lineage with the latest rc (0.12.1.6rc5) release of acryl-datahub

I'm going to close this issue for now, but feel free to ask any additional questions.

from datahub.

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.