在你執行下麵的Python代碼磚工作區,使家族係統表
導入請求ctx = dbutils.notebook.entry_point.getDbutils () .notebook () .getContext () api_url = ctx.tags () . get (" browserHostName ") . get () api_token = ctx.apiToken () . get()頭={“授權”:f 'Bearer {api_token} '} account_id = ctx.tags () . get (" accountId ") . get() #獲得metastore id url = f 'https: / / {api_url} / api / 2.1 / unity-catalog / metastores metastore_id =請求。get (url,標題=頭). json () [' metastores '] [0] [' metastore_id '] #使url = f 'https血統表:/ / {api_url} / api / 2.0 / unity-catalog metastores / {metastore_id} / systemschemas /訪問的請求。把(url,頭=標題)