1

I am working with Azure Databricks to create a delta table on Azure Data Lake Storage Gen2 and running into error.

Code:

dataframe.write.format("delta").mode("overwrite").option("path","abfss://<ContainerName>@<StorageAccount>.dfs.core.windows.net").saveAsTable("test_table")

Error:

IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: abfss://<ContainerName>@<StorageAccount>.dfs.core.windows.net_delta_log
paone
  • 828
  • 8
  • 18

1 Answers1

1

You need to set path to the specific directory inside your Data Lake, not onto the top of the container. Something like:

ContainerName = "container"
StorageAccount = "account"
table_path = f"abfss://{ContainerName}@{StorageAccount}.dfs.core.windows.net/test-table"
dataframe.write.format("delta").mode("overwrite")\
  .option("path", table_path).saveAsTable("test_table")
Alex Ott
  • 80,552
  • 8
  • 87
  • 132