paul-rogers commented on a change in pull request #2030: Update docs for
Metastore to point that all format plugins are supported
URL: https://github.com/apache/drill/pull/2030#discussion_r394555748
##########
File path:
_docs/performance-tuning/drill-metastore/010-using-drill-metastore.md
##########
@@ -442,3 +455,114 @@ apache drill (information_schema)> SELECT * FROM
INFORMATION_SCHEMA.`COLUMNS` WH
+---------------+--------------+------------+-----------------+------------------+----------------+-------------+-------------------+--------------------------+------------------------+-------------------+-------------------------+---------------+--------------------+---------------+--------------------+-------------+---------------+-----------+---------+---------+-----------+-------------------+-----------+
17 rows selected (0.183 seconds)
```
+
+### Provisioning schema for Drill Metastore
+
+#### Directory and File Setup
+
+Set up storage plugin for desired file system, as described here:
+ [Connecting Drill to a File
System]({{site.baseurl}}/docs/file-system-storage-plugin/#connecting-drill-to-a-file-system).
+
+Set `store.format` to `csvh`:
+
+```
+SET `store.format`='csvh';
++------+-----------------------+
+| ok | summary |
++------+-----------------------+
+| true | store.format updated. |
++------+-----------------------+
+```
+
+Create text table based on the sample `/tpch/nation.parquet` table from `cp`
plugin:
+
+```
+create table dfs.tmp.text_nation as (select * from cp.`/tpch/nation.parquet`);
++----------+---------------------------+
+| Fragment | Number of records written |
++----------+---------------------------+
+| 0_0 | 25 |
++----------+---------------------------+
+```
+
+Query the table `text_nation`:
+
+```
+SELECT count(*) FROM dfs.tmp.`text_nation`;
++--------+
+| EXPR$0 |
++--------+
+| 25 |
++--------+
+```
Review comment:
(Suggestion: since we are applying a schema, show the original types using
the clunky `typeof()` functions. This will show that the columns start as
`VARCHAR`, but that applying the schema gives them more useful types.
Otherwise, I think the point may be lost on most users.
And, yes, we should have a `DESCRIBE TABLE` to do the job instead of `SELECT
typeof(n_nationkey), typeof(...`)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services