If you open a hyper file saved from extract in Tableau and inspect the data source ( Which usually is Extract.Extract) you will see the Field Name, Physical Column and Remote Field name. However this is not available in Hyper API (see the code below) I can only get the field name and the field type but not Physical Columns and Remote field. Is there other way to query it ?
def GetHyperStructure(self, hyperfile):
with HyperProcess(Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU) as hyper:
with Connection(endpoint=hyper.endpoint, database=hyperfile) as connection:
table_names = connection.catalog.get_table_names(schema="Extract")
for table in table_names:
table_definition = connection.catalog.get_table_definition(name=table)
print(f"Table {table.name} has qualified name: {table}")
for column in table_definition.columns:
print(f"Column {column.name} has type={column.type} and nullability={column.nullability}")