Skip to content

Commit

Permalink
added wildfire query example to return table with col names
Browse files Browse the repository at this point in the history
  • Loading branch information
jpulidojr committed Dec 17, 2024
1 parent 5288553 commit 57a8fc3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/wildfire/wildfire_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
cnames = a.artifact_handler(interaction_type='get', query = "PRAGMA table_info(wfdata);")
data = a.artifact_handler(interaction_type='get', query = "SELECT * FROM wfdata;")#, isVerbose = True)

# a.artifact_handler(interaction_type="read")
clist = [i[1] for i in cnames]
dlist = list(data)
print(clist)
print(dlist)
# a.unload_module('backend', 'Sqlite', 'back-write')
table = [clist] + [list(row) for row in data]

print(table)
# a.unload_module('backend', 'Sqlite', 'back-write')

0 comments on commit 57a8fc3

Please sign in to comment.