jencake
jencake

Reputation: 161

Dynamically get the database name from a Databricks DLT pipeline

How do I dynamically get the database name from a DLT pipeline?

Upvotes: 3

Views: 401

Answers (1)

Jodiug
Jodiug

Reputation: 6098

I found this using spark.conf.getAll:

dlt_database_name = spark.conf.get("pipelines.schema")

We are using DLT from a database in hive_metastore, so I'm not sure yet if it would work for Unity Catalog.

Upvotes: 0

Related Questions