Open davidkhala opened 1 week ago
lineage.py
# MAGIC %sql # MAGIC -- assume Global Temp view exist # MAGIC CREATE WIDGET TEXT notebooks_dimension_table_name DEFAULT "notebooks_dimension"; # MAGIC # MAGIC select * from global_temp.${notebooks_dimension_table_name} # COMMAND ----------
def get_column_lineage(table_name): response = requests.get( API_URL + '/api/2.0/lineage-tracking/column-lineage', headers={"Authorization": "Bearer " + TOKEN}, data=json.dumps({'table_name':table_name}) ).json() return response get_column_lineage(dbutils.widgets.get("table_name"))
%sql -- assume Global Temp view exist CREATE WIDGET TEXT notebooks_dimension_table_name DEFAULT "notebooks_dimension"; select * from global_temp.:notebooks_dimension
lineage.py