<filename>src/databricksbundle/notebook/path/DatabricksScriptPathResolver.py<gh_stars>0
import sys
from pathlib import Path
from databricksbundle.notebook.path.NotebookPathResolverInterface import NotebookPathResolverInterface


class DatabricksScriptPathResolver(NotebookPathResolverInterface):
    def resolve(self) -> Path:
        if len(sys.argv) == 1:
            raise Exception(
                "spark_python_task.parameters in Databricks job configuration must contain real pipeline path as the first parameter"
            )

        return Path(sys.argv[1])

<filename>src/databricksbundle/notebook/path/DatabricksScriptPathResolver.py<gh_stars>0
import sys
from pathlib import Path
from databricksbundle.notebook.path.NotebookPathResolverInterface import NotebookPathResolverInterface


class DatabricksScriptPathResolver(NotebookPathResolverInterface):
    def resolve(self) -> Path:
        if len(sys.argv) == 1:
            raise Exception(
                "spark_python_task.parameters in Databricks job configuration must contain real pipeline path as the first parameter"
            )

        return Path(sys.argv[1])
