Hi , I am trying to ingest data from superset to d...
# ingestion
b
Hi , I am trying to ingest data from superset to datahub. charts, dashboards and their internal ineage was loaded successfully, but not able to find any inputs or the source datasets to get the end - to - end lineage. Any help would be much appreciated .. For reference, config_file
Copy code
source:
  type: superset
  config:
    # Coordinates
    connect_uri: <>

    # Credentials
    username: admin
    password: admin

sink:
  type: "datahub-rest"
  config:
    # TODO : Parameterizing the sink url from single config
    server: <>
under lying source for superset datasets is redshift ..
s
When you say end-to-end lineage what were you expecting that is missing?
b
source-datasets [lying in redshift] -> [dataset in superset] -> [charts] -> [dashboards]
lineage part from
source-datasets [lying in redshift] -> [dataset in superset] -> [charts]
is the missing link ..
s
source-datasets [lying in redshift]
and
[dataset in superset]
are the same thing. Just represented differently in superset (as connection) vs original source. For getting schema from redshift you will have to use redshift source.
Can you send a screenshot of the lineage that you are seeing so far? Please obfuscate any confidential information. Just interested in the lineage between the entity types
b
Yes, i have redshift source ingested as well , but lineage from
redshift to superset chart
is not there..
s
can you run the recipe, write output to file and check if there is anything called
chartInfo
or something like that there? The code is there for this lineage https://github.com/linkedin/datahub/blob/master/metadata-ingestion/src/datahub/ingestion/source/superset.py#L290 so it should be coming
Or check the mysql table to see if there is
chartInfo
aspect for the chart?
b
okay thanks checking the same.
maybe this can be the issue i checked the json output of the ingestion Getting inputs in chartInfo as
Copy code
"inputs": [
                            {
                                "string": "urn:li:dataset:(urn:li:dataPlatform:external,Amazon Redshift.<schema-name>.<table-name>,PROD)"
                            }
                        ],
as we can see here Amon redshift is
<schema-name>.<table-name>
whereas, redshift takes the dataset name as
<database-name>.<schema-name>.<table-name>
s
Is the database name configured in redshift connection in superset?
As you can see here if superset API returns database name it will be added in the URN https://github.com/linkedin/datahub/blob/master/metadata-ingestion/src/datahub/ingestion/source/superset.py#L160
However I am not sure if this was tested with redshift
b
yes i checked basically, datahub cli uses
Display Name
, which was different from the original Database Name in my case causing the issue . but now i checked the backend (entity type) is external in the above case , it should be redshift any idea to change the same updated (current -state) :
Copy code
"inputs": [
                            {
                                "string": "urn:li:dataset:(urn:li:dataPlatform:external,mydb.<schema-name>.<table-name>,PROD)"
                            }
                        ],
expected :
Copy code
"inputs": [
                            {
                                "string": "urn:li:dataset:(urn:li:dataPlatform:redshift,Amazon Redshift.<schema-name>.<table-name>,PROD)"
                            }
                        ],
s
Can you tell what your sqlalchemy url looks like? This https://github.com/linkedin/datahub/blob/master/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py#L84 controls platform name
Copy code
sqlalchemy_uri.startswith("jdbc:postgres:")
        and sqlalchemy_uri.index("redshift.amazonaws") > 0
Does your uri not satisfy either of these conditions?
I see there is a bug there. It should be redshift not sure why it is postgres
No it seems it has to be
jdbc:postgres
not
redshift
Please share what your sqlalchemy uri looks like and we can find a solution for you
b
Need to check what url is generated by superset under the hood.. (because on ui it accepts only host and port and credentials) checking the same on superset docs.
s
b
yes , https://superset.apache.org/docs/databases/installing-database-drivers
Copy code
redshift+psycopg2://<userName>:<DBPassword>@<AWS End Point>:5439/<Database Name>
s
Raised PR for the fix https://github.com/linkedin/datahub/pull/3944. Once this is merged and a release is made the problem with
external
should be fixed
🙌 1
b
Thanks for all the support.
@square-activity-64562 Just for my info , what is the pattern of release cycle (is it once a month or quarter )? or random...
s
The python client is released very frequently https://github.com/acryldata/datahub/releases
For the server releases at least twice a month. If there are major issues fixed more frequent releases might happen. https://github.com/linkedin/datahub/releases
👍 1