Sample Profile Data for Sample Tables (#815)

* Sample Profile Data for Sample Tables

* Disabling Profile as Default

* Added Sample Profile Data to 3 additional sample tables
This commit is contained in:
Ayush Shah 2021-10-18 05:54:39 +05:30 committed by Sriharsha Chintalapani
parent fc84c15626
commit abe03f52e9
3 changed files with 5368 additions and 304 deletions

File diff suppressed because it is too large Load Diff

View File

@ -332,10 +332,11 @@ class OpenMetadataAPIClient(object):
return TableData(**resp["sampleData"])
def ingest_table_profile_data(self, table_id, table_profile):
resp = self.client.put(
"/tables/{}/tableProfile".format(table_id.__root__),
data=table_profile.json(),
)
for profile in table_profile:
resp = self.client.put(
"/tables/{}/tableProfile".format(table_id.__root__),
data=profile.json(),
)
return [TableProfile(**t) for t in resp["tableProfile"]]
def get_table_by_id(self, table_id: str, fields: [] = ["columns"]) -> Table:

View File

@ -238,7 +238,7 @@ class SQLSource(Source):
if self._instantiate_profiler():
profile = self.run_data_profiler(table_name, schema)
table_entity.tableProfile = profile
table_entity.tableProfile = [profile]
table_and_db = OMetaDatabaseAndTable(
table=table_entity, database=self._get_database(schema)