Hi team, Is there support to create assertions via...
# getting-started
n
Hi team, Is there support to create assertions via GraphQL apis? I see that there is a query
assertion(urn: String!)
to fetch existing assertion and a mutation
deleteAssertion(urn: String!)
to delete assertion. But couldn't find a mutation to create a new one. Is it part of some other mutation ? TIA
1
Also, a follow up question is whether we can create Datasets via GraphQL apis ?
We need to evaluate and finalize the APIs that we will use (GraphQL vs OpenAPI) to integrate with datahub. And the evaluation is based on the ability to create and update entities like tags, domains, glossary terms, datasets, data products, ingestion and assertions.
d
Hi Ishwar, we don’t support creating dataset via GraphQL at the moment ( cf : https://datahubproject.io/docs/api/tutorials/datasets#create-dataset) AFAIK, we don’t support creating assertions via graphQL either - @gray-shoe-75895 could you confirm on this?
n
Hi @delightful-ram-75848, thanks for the response. Any idea when this will be available ?
a
It’s possible to create both datasets and assertions using the Python SDK, which uses the Restli APIs under the hood. However, we don’t support those via graphql yet
b
Hey, just want to follow up on creating assertions and datasets using Python SDK. I was not able to find Python SDK for assertions creation. Can you help me out where to find the code for the same?
b
Thanks! 🙌
Hi, I also wanted to enable the validation through recipe file for postgres db. Can you point to the example for the same? Thanks!
a
What exactly are you looking to do?
b
Yea, so I am inserting metadata through 2 ways postgres db(recipe file) and csv file( Python Sdk), so I want to have Validation tab enabled in both the cases.
a
Yup - if you have data quality stats associated with the dataset urns - either the postgres ones or the ones from your csv file - then the validate tab will be enabled
b
Can you give any example of recipe file for postgres to enable the validation tab? Thanks!
n
Hi @billions-baker-82097, I believe there is no support currently in Datahub to define data quality checks on a dataset. In our project, we are leveraging Great Expectations to run validations and export the results to Datahub. Which can then be viewed under Validation tab.
👍 1