You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by dz...@apache.org on 2022/05/27 12:29:29 UTC

[drill-site] branch master updated: Document paths in filesystem queries being Java strings and give Windows example.

This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 9943b166e Document paths in filesystem queries being Java strings and give Windows example.
9943b166e is described below

commit 9943b166e48d1fffe7514dd1491119cda746b8af
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Fri May 27 14:28:42 2022 +0200

    Document paths in filesystem queries being Java strings and give Windows example.
---
 .../005-querying-a-file-system-introduction.md       | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/_docs/en/query-data/query-a-file-system/005-querying-a-file-system-introduction.md b/_docs/en/query-data/query-a-file-system/005-querying-a-file-system-introduction.md
index b45b88255..1fed35c13 100644
--- a/_docs/en/query-data/query-a-file-system/005-querying-a-file-system-introduction.md
+++ b/_docs/en/query-data/query-a-file-system/005-querying-a-file-system-introduction.md
@@ -11,9 +11,23 @@ followed by an optional workspace name, for example <storage
 plugin>.<workspace> or hdfs.logs.
 
 The following example shows a query on a file system database in a Hadoop
-distributed file system:
-
-       SELECT * FROM hdfs.logs.`AppServerLogs/20104/Jan/01/part0001.txt`;
+distributed file system.
+
+```sql
+SELECT * FROM hdfs.logs.`AppServerLogs/20104/Jan/01/part0001.txt`;
+```
+
+The path component in backticks is parsed by Drill as a Java string which
+means that the backslash `\` is the escape character that can be used to
+include special characters in the path. The next example shows another query
+against a filesystem storage plugin, but now one which is configured to
+access the local filesystem on an MS Windows machine (which may, of course,
+included mounted network drives). Note the doubled backslashes needed due
+to its status as the escape character.
+
+```sql
+SELECT * FROM dfs.`C:\\Users\\Alice\\Downloads\\sample-dataset.csv`;
+```
 
 The default `dfs` storage plugin configuration registered with Drill has a
 `default` workspace. If you query data in the `default` workspace, you do not