Exemplo n.º 1
0
def _load_deployments(api_client: ApiClient, artifact_base_uri: str):
    dbfs_service = DbfsService(api_client)
    dbx_deployments = f"{artifact_base_uri}/.dbx/deployments.json"
    raw_config_payload = dbfs_service.read(dbx_deployments)["data"]
    payload = base64.b64decode(raw_config_payload).decode("utf-8")
    deployments = json.loads(payload)
    return deployments
Exemplo n.º 2
0
def _load_dbx_file(api_client: ApiClient, artifact_base_uri: str,
                   name: str) -> Dict[Any, Any]:
    dbfs_service = DbfsService(api_client)
    dbx_deployments = f"{artifact_base_uri}/.dbx/{name}"
    raw_config_payload = dbfs_service.read(dbx_deployments)["data"]
    payload = base64.b64decode(raw_config_payload).decode("utf-8")
    deployments = json.loads(payload)
    return deployments