Skip to content

Commit a05cd65

Browse files
author
amesar
committed
Fixed notebook Console Script .databricks.cfg bug
1 parent 4d72ebd commit a05cd65

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

databricks_notebooks/scripts/Common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def create_databrick_config_file(secrets_scope, secrets_key, databricks_config_f
1010

1111
import os
1212
if not databricks_config_file:
13-
databricks_config_file = os.path.join("/tmp", f".databricks.cfg-{user}")
13+
databricks_config_file = os.path.join("/tmp", f".databrickscfg-{user}")
1414
print(f"DATABRICKS_CONFIG_FILE: {databricks_config_file}")
1515
os.environ["DATABRICKS_CONFIG_FILE"] = databricks_config_file
1616
dbutils.fs.put(f"file:///{databricks_config_file}",f"[DEFAULT]\nhost=https://{host_name}\ntoken = "+token,overwrite=True)

databricks_notebooks/scripts/Console_Scripts.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Databricks notebook source
22
# MAGIC %md ## Console Scripts - Single
3-
# MAGIC
3+
# MAGIC
44
# MAGIC * Use this notebook as a starting point template for executing console scripts.
55
# MAGIC * See [github.com/mlflow/mlflow-export-import/blob/master/README_single.md](https://github.com/mlflow/mlflow-export-import/blob/master/README_single.md).
66
# MAGIC * You'll first need to specify a [Databricks secret](https://docs.databricks.com/security/secrets/secrets.html) to your [PAT](https://docs.databricks.com/administration-guide/access-control/tokens.html) (personal access token) to execute CLI commands.
@@ -23,6 +23,12 @@
2323

2424
# COMMAND ----------
2525

26+
# MAGIC %sh
27+
# MAGIC echo "DATABRICKS_CONFIG_FILE: $DATABRICKS_CONFIG_FILE"
28+
# MAGIC cat $DATABRICKS_CONFIG_FILE
29+
30+
# COMMAND ----------
31+
2632
# MAGIC %md ### Single notebooks
2733

2834
# COMMAND ----------

0 commit comments

Comments
 (0)