Skip to content

Commit 0e13822

Browse files
authored
Don't create schema pointing to root folder (#135)
1 parent 9708de6 commit 0e13822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spark_utils/delta_lake/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def publish_delta_to_hive(
9595
"""
9696

9797
spark_session.sql(
98-
f"CREATE SCHEMA IF NOT EXISTS {publish_schema_name} location 'abfss://{data_path[8:].split('/')[0]}/'"
98+
f"CREATE SCHEMA IF NOT EXISTS {publish_schema_name} location 'abfss://{'/'.join(data_path[8:].split('/')[0:-1])}/'"
9999
)
100100
if refresh:
101101
spark_session.sql(f"DROP TABLE IF EXISTS {publish_schema_name}.{publish_table_name}")

0 commit comments

Comments
 (0)