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 ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ01-18-2023 08:12 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ01-18-2023 09:21 PM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ01-19-2023 03:08 AM
It works! Thank you, SRK!

