Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ def get_table_query_string(self, **kwargs) -> str:
raise AssertionError("Could not find an active spark session.")
try:
df = spark_session.read.format(self.file_format).load(*paths)
except Exception:
logger.exception(
"Spark read of file source failed.\n" + traceback.format_exc()
)
tmp_table_name = get_temp_entity_table_name()
df.createOrReplaceTempView(tmp_table_name)

return f"`{tmp_table_name}`"
tmp_table_name = get_temp_entity_table_name()
df.createOrReplaceTempView(tmp_table_name)

return f"`{tmp_table_name}`"
except Exception as e:
msg = "Spark read of file source failed.\n" + traceback.format_exc()
logger.exception(msg)
raise Exception(msg) from e