Skip to content

Commit

Permalink
feat: add show and load sql to print result set (#3856)
Browse files Browse the repository at this point in the history
* Add show and load sql to print result set

* Add strip for sql text
  • Loading branch information
tobegit3hub authored Apr 18, 2024
1 parent e1369fb commit 611189d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/openmldb_sdk/openmldb/sql_magic/sql_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def sql(self, line, cell=None):
else:
sqlText = cell.replace("\n", " ")

is_query = sqlText.strip().lower().startswith("select")
is_query = sqlText.strip().lower().startswith("select") or sqlText.strip().lower().startswith("show") or sqlText.strip().lower().startswith("load")
if is_query:
rows = self.cursor.execute(sqlText).fetchall()
schema_map = self.cursor.get_resultset_schema()
Expand Down

0 comments on commit 611189d

Please sign in to comment.