Skip to content
Merged
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
7 changes: 7 additions & 0 deletions py-src/data_formulator/data_loader/mysql_data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ def _read_sql(self, query: str) -> pa.Table:
conn = self._get_conn()
cur = conn.cursor()
try:
# Force a fresh REPEATABLE READ snapshot on every read so rows
# committed by other sessions after this loader was first
# instantiated are visible without restarting the process.
try:
conn.commit()
Comment on lines +132 to +136
except Exception:
pass
Comment on lines +135 to +138
cur.execute(query)
if cur.description is None:
return pa.table({})
Expand Down