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-#6952: use render_as_string to get sqlalchemy engine url #6953

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion modin/core/io/sql/sql_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def write(cls, qc, **kwargs):
# are not pickleable. We have to convert it to the URL string and connect from
# each of the workers.
if cls._is_supported_sqlalchemy_object(kwargs["con"]):
kwargs["con"] = str(kwargs["con"].engine.url)
kwargs["con"] = kwargs["con"].engine.url.render_as_string(
hide_password=False
tochigiv marked this conversation as resolved.
Show resolved Hide resolved
)

empty_df = qc.getitem_row_array([0]).to_pandas().head(0)
empty_df.to_sql(**kwargs)
Expand Down