Add Python instruction in code in order to format in Databricks cells

Viewed 46

I have some Python Databricks notebooks that I usually develop locally with PyCharm and when I want to test them on a Databricks cluster I deploy them with an Azure DevOps pipeline (both for test and production environments).

When I use directly the Databricks workspace in the development phase I obviously can split the code into cells in order to logically separate the code and monitor the execution, but when I deploy the code to Databricks with a pipeline I have to use a Python file, so the result is that the whole code is in a single cell.

Is there any way or instruction I can add to my code in order to be parsed by Databricks as "put these code lines in a separate cell"?

Thanks in advance

1 Answers
Related