How to run the .py file in databricks cluster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2021 01:28 AM
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
- Labels:
-
Dashboards
-
Py File
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2021 02:13 AM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2021 09:19 AM
@kalyan p - Did @Hubert Dudek's answer help solve the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2022 06:02 AM
Hello @Piper Wilson
Would this task not help?
https://docs.databricks.com/dev-tools/api/latest/examples.html#jobs-api-examples

