@Janga Reddyโ :
To enable Delta Live Tables (DLT) pipelines for tables that are in Unity Catalog (UC), you can follow these general steps:
- Create a new Databricks cluster or use an existing one.
- Connect to UC using the Unity Catalog API. You can use the spark.conf.set() method to set the UC configuration parameters. For example:
spark.conf.set("spark.databricks.delta.preview.enabled", "true")
spark.conf.set("spark.databricks.delta.properties.defaults.catalog.spark_catalog", "com.databricks.spark.catalog.UnityCatalog")
spark.conf.set("spark.hadoop.fs.unity.impl", "com.databricks.backend.daemon.dbutils.UnityFileSystem")
spark.conf.set("spark.databricks.clusterUsageTags.clusterName", "<cluster_name>")
3) Create a Delta table using the spark.read method with the UnifiedAnalyticsDataSource data source and the table location in UC. For example:
df = spark.read.format("com.databricks.spark.sqldw").option("url", "<jdbc_url>").option("query", "<query>").load()
df.write.format("delta").option("path", "unity://<catalog>.<namespace>/<table_name>").save()
Note that you need to replace <cluster_name>, <jdbc_url>, <query>, <catalog>, <namespace>, and
<table_name> with the appropriate values for your UC and Databricks environment.
Also, please note that Unity Catalog is a proprietary Databricks feature, and it is not available in open source Apache Spark. If you are not using Databricks Unified Analytics Platform, you may not be able to use Unity Catalog.