Skip to content

Commit

Permalink
FIX-modin-project#6952: use render_as_string to get sqlalchemy engi…
Browse files Browse the repository at this point in the history
…ne url (modin-project#6953)

Signed-off-by: Bailey Brownie <bailey.brownie60@gmail.com>
  • Loading branch information
tochigiv committed Feb 22, 2024
1 parent 4704751 commit c072c5b
Showing 1 changed file with 3 additions and 1 deletion.
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
)

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

0 comments on commit c072c5b

Please sign in to comment.