I want to insert profiles for a dataset in the sta...
# ingestion
c
I want to insert profiles for a dataset in the stats part of datahub. is there a json file or another solution I can use for an example on how to do what i want. i will appreciate your help
e
Also we support profiling for any sql based sources ! https://datahubproject.io/docs/metadata-ingestion/source_docs/sql_profiles We will be bringing out more improvements to this in the next release (going to be demoed in townhall this Friday!)
c
xL thank you for your help. do you have any idea if there is a python code doing the same thing?
b
you mean to say, you want to manually create a dataset profile? you could look at the profiling code: https://github.com/linkedin/datahub/blob/master/metadata-ingestion/src/datahub/ingestion/source/ge_data_profiler.py and the sqlalchemy bit: https://github.com/linkedin/datahub/blob/master/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py and see how you want to do it
c
xL what im trying to figure out is how can i send the json file you sent me https://github.com/linkedin/datahub/blob/master/metadata-ingestion/examples/mce_files/demo-profiles.json via a python script to a stats part of a dataset
b
So this json file will write several profile run results to a particular dataset as specified by the entityUrn. You could change the urn to write this dummy data to your dataset. To write this to datahub, create a yml like the following: https://github.com/linkedin/datahub/blob/master/metadata-ingestion/examples/recipes/file_to_datahub_rest.yml Then you can write it to datahub using the datahub ingest -c config-file.yml
c
also is there a aspect for adding profile to the dataset, like the link below:https://github.com/linkedin/datahub/blob/master/metadata-ingestion/examples/mce_files/bootstrap_mce.json
b
Dataset profiles are not aspects of a dataset unlike schemaMetadata or institutionalMemory.
c
thank you for your time. so the only way to add data profile is by manually using https://github.com/linkedin/datahub/blob/master/metadata-ingestion/examples/mce_files/demo-profiles.json
b
Well yes, it's either 1. Use the provided connectors or 2. Write your own json. You can call the datasetprofile class to help guide the populating of values.