cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to access the json file in the github repo from the databricks notebookI have a repo integrated with Databricks workspace.  When I run %sh pwd ...

CK
New Contributor II

I need to access the json file in the github repo from the databricks notebook

I have a repo integrated with Databricks workspace.

When I run %sh pwd it returns this path /Workspace/Repos/chris@myemail/Repo/folder/test.json.

I'm not able to access the json file using this path.

2 REPLIES 2

SRK
Contributor III

I used the following code to read json file from this location and its working for me. Can you check if this works for you:

envconfigfilepath = "/Workspace/Repos/xyz@abc.io/Repo/notebooks/WF_Config/modify_config.json"

with open(envconfigfilepath) as json_data:

  env_object = json.load(json_data)

CK
New Contributor II

It works! Thank you, SRK!

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now