cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to run the .py file in databricks cluster

data_engineer_0
New Contributor II

Hi team,

I wants to run the below command in databricks and also need to capture the error and success message.

Please help me out here,Thanks in advance

Ex: python3 /mnt/users/code/x.py --arguments

3 REPLIES 3

Hubert-Dudek
Esteemed Contributor III

When you use repo you can enable "files in repo" and then just import class in notebook and init it.

from file_folder.file_name import your_class

c = your_class(arguments)

Anonymous
Not applicable

@kalyan p​ - Did @Hubert Dudek​'s answer help solve the issue?

User16764241763
Honored Contributor

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group