You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by cg...@apache.org on 2023/02/26 16:13:30 UTC

[drill-site] branch master updated: Create 119-access-format-plugin.md

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

cgivre 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 388cc283e Create 119-access-format-plugin.md
388cc283e is described below

commit 388cc283ea21f4eb71330fc164d124a019f7c84b
Author: Charles S. Givre <cg...@apache.org>
AuthorDate: Sun Feb 26 11:13:26 2023 -0500

    Create 119-access-format-plugin.md
---
 .../119-access-format-plugin.md                    | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/_docs/en/data-sources-and-file-formats/119-access-format-plugin.md b/_docs/en/data-sources-and-file-formats/119-access-format-plugin.md
new file mode 100644
index 000000000..d313db4f6
--- /dev/null
+++ b/_docs/en/data-sources-and-file-formats/119-access-format-plugin.md
@@ -0,0 +1,47 @@
+---
+title: "Microsoft Access Format Plugin"
+slug: "MS Access Format Plugin"
+parent: "Data Sources and File Formats"
+---
+
+This plugin enables Drill to read Microsoft Access database files. This plugin can read Access Files from all versions later than Access 1997.
+
+## Configuration
+Simply add the following to any Drill file system configuration.  Typically, MS Access files will use the extension `accdb` or `mdb`.  Drill comes pre-configured to recognize these extensions as MS Access.
+
+```json
+"msaccess": {
+  "type": "msaccess",
+  "extensions": ["mdb", "accdb"]
+}
+```
+
+## Schemas
+Drill will discover the schema automatically from the Access file.  The plugin does support schema provisioning for consistency, but is not recommended.
+
+## Querying a Table
+Access files will contain multiple tables.  To access a specific table, use the `table()` function in the `FROM` clause, and specify the table name using the `tableName` parameter, as shown below.
+
+```sql
+SELECT * 
+FROM table(dfs.`file_name.accdb` (type=> 'msaccess', tableName => 'Table1'))
+```
+
+## Metadata Queries
+Since an Access file may contain multiple tables, there needs to be a way to determine what tables are present in the Access file.  In Drill, simply querying a file, without specifying a `tableName` will result in a metadata query, rather than getting the actual data back.  
+
+For example:
+
+```sql
+SELECT * FROM dfs.test.`access/data/V2019/extDateTestV2019.accdb`;
++--------+-------------------------+-------------------------+-----------+-----------+----------------------------------------------------------------------+
+| table  |      created_date       |      updated_date       | row_count | col_count |                               columns                                |
++--------+-------------------------+-------------------------+-----------+-----------+----------------------------------------------------------------------+
+| Table1 | 2021-06-03 20:09:56.993 | 2021-06-03 20:09:56.993 | 9         | 6         | ["ID","Field1","DateExt","DateNormal","DateExtStr","DateNormalCalc"] |
++--------+-------------------------+-------------------------+-----------+-----------+----------------------------------------------------------------------+
+
+```
+
+
+## Password-Protected Files
+The password protection in Access is just a software level protection and really does not offer any security.  Drill can query password protected files without any password.