You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-p, --data-path <DATA_PATH> Path to your data, default to current directory
104
+
-q, --quiet Reduce printing other than the results and work quietly
105
+
-r, --rc <RC>... Run the provided files on startup instead of ~/.datafusionrc
106
+
-V, --version Print version information
107
+
108
+
Type `exit` or `quit` to exit the CLI.
109
+
```
110
+
111
+
## Registering Parquet Data Sources
112
+
113
+
Parquet data sources can be registered by executing a `CREATE EXTERNAL TABLE` SQL statement. It is not necessary to provide schema information for Parquet files.
114
+
115
+
```sql
116
+
CREATE EXTERNAL TABLE taxi
117
+
STORED AS PARQUET
118
+
LOCATION '/mnt/nyctaxi/tripdata.parquet';
119
+
```
120
+
121
+
## Registering CSV Data Sources
122
+
123
+
CSV data sources can be registered by executing a `CREATE EXTERNAL TABLE` SQL statement.
124
+
125
+
```sql
126
+
CREATE EXTERNAL TABLE test
127
+
STORED AS CSV
128
+
WITH HEADER ROW
129
+
LOCATION '/path/to/aggregate_test_100.csv';
130
+
```
131
+
132
+
It is also possible to provide schema information.
133
+
134
+
```sql
135
+
CREATE EXTERNAL TABLE test (
136
+
c1 VARCHAR NOT NULL,
137
+
c2 INT NOT NULL,
138
+
c3 SMALLINT NOT NULL,
139
+
c4 SMALLINT NOT NULL,
140
+
c5 INT NOT NULL,
141
+
c6 BIGINT NOT NULL,
142
+
c7 SMALLINT NOT NULL,
143
+
c8 INT NOT NULL,
144
+
c9 BIGINT NOT NULL,
145
+
c10 VARCHAR NOT NULL,
146
+
c11 FLOAT NOT NULL,
147
+
c12 DOUBLE NOT NULL,
148
+
c13 VARCHAR NOT NULL
149
+
)
150
+
STORED AS CSV
151
+
LOCATION '/path/to/aggregate_test_100.csv';
152
+
```
153
+
154
+
## Commands
75
155
76
156
Available commands inside DataFusion CLI are:
77
157
@@ -101,7 +181,7 @@ Available commands inside DataFusion CLI are:
0 commit comments