Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time dependent spark source exception #107

Open
wants to merge 1 commit into
base: 0.28-affirm
Choose a base branch
from
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