Skip to content

Commit

Permalink
Update sql_magic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oualib committed Oct 27, 2023
1 parent 4344310 commit 7861d29
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions verticapy/jupyter/extensions/sql_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,9 @@ def sql_magic(
usecols=columns,
)

try:
if not (query_subtype.upper().startswith(SPECIAL_WORDS)):
is_vdf = False
if not(query_subtype.upper().startswith(SPECIAL_WORDS)):
try:
result = create_new_vdf(
query,
_is_sql_magic=True,
Expand All @@ -938,10 +939,12 @@ def sql_magic(
result._vars["max_rows"] = options["-nrows"]
if "-ncols" in options:
result._vars["max_columns"] = options["-ncols"]
else:
raise
is_vdf = True
except:
pass # we could not create a vDataFrame out of the query.

if not(is_vdf):

except:
try:
final_result = _executeSQL(
query, method="fetchfirstelem", print_time_sql=False
Expand Down

0 comments on commit 7861d29

Please sign in to comment.