Skip to content

Ability to import dlt signatures without a current SparkSession #6

@marijncv

Description

@marijncv

I've been happily using the dlt-with-debug library, but I'm running into an issue when importing the dlt signatures without an active SparkSession. I'm trying:

import dlt_with_debug.dlt_signatures as dlt

But the __init__.py calls the v2.py file which in turn tries to get the pipeline_id from the current SparkSession. But this fails when there is no active SparkSession.

I think my usecase can be achieved with an extra check in

pipeline_id = spark.conf.get("pipelines.id", None)
that first confirms there is an actual SparkSession before calling .conf.get() on it.

@souvik-databricks curious what you think! And I'd be happy to contribute via PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions