alamb commented on code in PR #7594:
URL: https://github.com/apache/arrow-datafusion/pull/7594#discussion_r1329426601
##########
docs/source/user-guide/cli.md:
##########
@@ -131,24 +88,87 @@ OPTIONS:
-V, --version Print version information
```
-## Selecting files directly
+## Querying data from the files directly
Files can be queried directly by enclosing the file or
directory name in single `'` quotes as shown in the example.
+## Example
+
+Create a CSV file to query.
+
+```shell
+$ echo "a,b" > data.csv
+$ echo "1,2" >> data.csv
+```
+
+Query that single file (the CLI also supports parquet, compressed csv, avro,
json and more)
+
+```shell
+$ datafusion-cli
+DataFusion CLI v17.0.0
+❯ select * from 'data.csv';
++---+---+
+| a | b |
++---+---+
+| 1 | 2 |
++---+---+
+1 row in set. Query took 0.007 seconds.
+```
+
+You can also query directories of files with compatible schemas:
Review Comment:
👍
##########
docs/source/user-guide/cli.md:
##########
@@ -131,24 +88,87 @@ OPTIONS:
-V, --version Print version information
```
-## Selecting files directly
+## Querying data from the files directly
Files can be queried directly by enclosing the file or
directory name in single `'` quotes as shown in the example.
+## Example
+
+Create a CSV file to query.
+
+```shell
+$ echo "a,b" > data.csv
+$ echo "1,2" >> data.csv
+```
+
+Query that single file (the CLI also supports parquet, compressed csv, avro,
json and more)
+
+```shell
+$ datafusion-cli
+DataFusion CLI v17.0.0
+❯ select * from 'data.csv';
++---+---+
+| a | b |
++---+---+
+| 1 | 2 |
++---+---+
+1 row in set. Query took 0.007 seconds.
+```
+
+You can also query directories of files with compatible schemas:
+
+```shell
+$ ls data_dir/
+data.csv data2.csv
+```
+
+```shell
+$ datafusion-cli
+DataFusion CLI v16.0.0
Review Comment:
It doesn't really matter, but it might be nice to have the versions be
consistent
```suggestion
DataFusion CLI v17.0.0
```
##########
docs/source/user-guide/cli.md:
##########
@@ -131,24 +88,87 @@ OPTIONS:
-V, --version Print version information
```
-## Selecting files directly
+## Querying data from the files directly
Files can be queried directly by enclosing the file or
directory name in single `'` quotes as shown in the example.
+## Example
+
+Create a CSV file to query.
+
+```shell
+$ echo "a,b" > data.csv
+$ echo "1,2" >> data.csv
+```
+
+Query that single file (the CLI also supports parquet, compressed csv, avro,
json and more)
+
+```shell
+$ datafusion-cli
+DataFusion CLI v17.0.0
+❯ select * from 'data.csv';
++---+---+
+| a | b |
++---+---+
+| 1 | 2 |
++---+---+
+1 row in set. Query took 0.007 seconds.
+```
+
+You can also query directories of files with compatible schemas:
Review Comment:
👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]