cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Access Git folder information from notebook

johnb1
Contributor

In my Workspace, I have a repository with Git folder.

I would like to access programatically with Python from within a notebook:

- name of the repo

- currently checked out branch in the repo

I want to do this in two different ways:

(1) Access said information in a notebook inside the repo's working directory

(2) Access said information in a notebook outside the repo's working directory

Can I achieve both aims, and how?

1 REPLY 1

szymon_dybczak
Esteemed Contributor III

Hi @johnb1 ,

You can use one of the following options to achieve what you want: 

- databricks CLI repos commands 

- databricks python SDK

- databricks rest API calls

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