drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bridg...@apache.org
Subject drill git commit: updates for pull 290
Date Fri, 04 Dec 2015 00:08:11 GMT
Repository: drill
Updated Branches:
  refs/heads/gh-pages 2d0956034 -> b9f63fb79


updates for pull 290


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/b9f63fb7
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/b9f63fb7
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/b9f63fb7

Branch: refs/heads/gh-pages
Commit: b9f63fb79c7e07518e81ed140126ec36c7b27428
Parents: 2d09560
Author: Bridget Bevens <bbevens@maprtech.com>
Authored: Thu Dec 3 16:06:46 2015 -0800
Committer: Bridget Bevens <bbevens@maprtech.com>
Committed: Thu Dec 3 16:06:46 2015 -0800

----------------------------------------------------------------------
 .../035-plugin-configuration-basics.md             | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/b9f63fb7/_docs/connect-a-data-source/035-plugin-configuration-basics.md
----------------------------------------------------------------------
diff --git a/_docs/connect-a-data-source/035-plugin-configuration-basics.md b/_docs/connect-a-data-source/035-plugin-configuration-basics.md
index 12c6033..8a065ce 100644
--- a/_docs/connect-a-data-source/035-plugin-configuration-basics.md
+++ b/_docs/connect-a-data-source/035-plugin-configuration-basics.md
@@ -144,7 +144,22 @@ The following table describes the attributes you configure for storage
plugins i
 
 ## Using the Formats Attributes
 
-You set the formats attributes, such as skipFirstLine, in the `formats` area of the storage
plugin configuration. When setting attributes for text files, such as CSV, you also need to
set the `sys.options` property `exec.storage.enable_new_text_reader` to true (the default).
For more information and examples of using formats for text files, see ["Text Files: CSV,
TSV, PSV"]({{site.baseurl}}{{site.baseurl}}/docs/text-files-csv-tsv-psv/).
+You set the formats attributes, such as skipFirstLine, in the `formats` area of the storage
plugin configuration. When setting attributes for text files, such as CSV, you also need to
set the `sys.options` property `exec.storage.enable_new_text_reader` to true (the default).
For more information and examples of using formats for text files, see ["Text Files: CSV,
TSV, PSV"]({{site.baseurl}}{{site.baseurl}}/docs/text-files-csv-tsv-psv/).  
+
+## Using the Formats Attributes as Table Function Parameters
+
+You can also set the formats attributes defined above on a per query basis.
+To pass parameters to the format plugin you can use the table function syntax:  
+
+`select a, b from table({table function name}(parameters))`
+
+The table function name is your table name, the type parameter is the format name and the
other parameters are the fields that the configuration of the format plugin accepts as defined
in the table above (except for `extensions` that does not apply in this context).
+
+For example to read a CSV file and parse its header:  
+`select a, b from table(dfs.``path/to/data.csv``(type => 'text',
+fieldDelimiter => ',', extractHeader => true))`
+
+For more information about format plugin configuration see ["Text Files: CSV, TSV, PSV"]({{site.baseurl}}{{site.baseurl}}/docs/text-files-csv-tsv-psv/).
 
 
 ## Using Other Attributes
 


Mime
View raw message