mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-01 18:15:50 +00:00
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:
parent
fc84c15626
commit
abe03f52e9
File diff suppressed because it is too large
Load Diff
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user