datafusion-contrib / datafusion-dft

A batteries included data processing app for the terminal
Apache License 2.0
102 stars 7 forks source link

How do I use this tool? #187

Closed qrilka closed 10 hours ago

qrilka commented 14 hours ago

I tried playing with the tool but it looks like I don't understand how to use it. E.g. in datafusion-cli I could run

$ datafusion-cli
DataFusion CLI v42.0.0
> select 1;
+----------+
| Int64(1) |
+----------+
| 1        |
+----------+
1 row(s) fetched. 
Elapsed 0.053 seconds.

but when I enter select 1; + Enter in SQL editor pane of dft nothing really happens, is this expected?

BTW SQL editor seems to have a number of missing features - I can't paste into it, Delete and Home keys are not working - does it deserve an issue or maybe there is already one?

matthewmturner commented 13 hours ago

Hi @qrilka - thanks for the report. you need to be in normal mode to execute the query (press e to enter edit mode, enter your query, then esc to go back to normal mode and press enter). similar to a normal sql ide enter just adds a new line when in edit mode. pasting works for me (cmd + v on mac although i confess i havent tried on other platforms) as does delete. heres a video showing these working.

issues always welcome though if something isnt working.

https://github.com/user-attachments/assets/296513e8-759b-47c1-9822-b61ed61b4317

qrilka commented 10 hours ago

This looks to be also to be explained by me using version 0.1.0 from crates.io - installed from sources and now it looks much better!

matthewmturner commented 10 hours ago

@qrilka i will make a note about that on the readme, apologies for the inconvenience.