# CONNECT Table Types - OEM: Implemented in an External LIB

Although CONNECT provides a rich set of table types, specific applications may need to access data organized in a way that is not handled by its existing foreign data wrappers (FDW). To handle these cases, CONNECT features an interface that enables developers to implement in C++ the required table wrapper and use it as if it were part of the standard CONNECT table type list. CONNECT can use these additional handlers providing the corresponding external module (dll or shared lib) be available.

To create such a table on an existing handler, use a Create Table statement as shown below.

```
CREATE TABLE xtab (COLUMN definitions)
ENGINE=CONNECT table_type=OEM MODULE='libname'
subtype='MYTYPE' [standard table options]
Option_list='Myopt=foo';
```

The option module gives the name of the DLL or shared library implementing the OEM wrapper for the table type. This library must be located in the plugin directory like all other plugins or UDF’s.

This library must export a function *GetMYTYPE*. The option subtype enables CONNECT to have the name of the exported function and to use the new table type. Other options are interpreted by the OEM type and can also be specified within the *option\_list* option.

Column definitions can be unspecified only if the external wrapper is able to return this information. For this it must export a function ColMYTYPE returning these definitions in a format acceptable by the CONNECT discovery function.

Which and how options must be specified and the way columns must be defined may vary depending on the OEM type used and should be documented by the OEM type implementer(s).

## An OEM Table Example

The OEM table REST described in [Adding the REST Feature as a Library Called by an OEM Table](https://mariadb.com/docs/server/server-usage/storage-engines/connect/connect-adding-the-rest-feature-as-a-library-called-by-an-oem-table) permits using REST-like tables with MariaDB binary distributions containing but not enabling the [REST table type](https://mariadb.com/docs/server/server-usage/storage-engines/connect/connect-table-types/connect-files-retrieved-using-rest-queries)

Of course, the mongo (dll or so) exporting the GetREST and colREST functions must be available in the plugin directory for all this to work.

### Some Currently Available OEM Table Modules and Subtypes

| Module   | Subtype | Description                                                           |
| -------- | ------- | --------------------------------------------------------------------- |
| libhello | HELLO   | A sample OEM wrapper displaying a one line table saying “Hello world” |
| mongo    | MONGO   | Enables using tables based on MongoDB collections.                    |
| Tabfic   | FIC     | Handles files having the Windev HyperFile format.                     |
| Tabofx   | OFC     | Handles Open Financial Connectivity files.                            |
| Tabofx   | QIF     | Handles Quicken Interchange Format files.                             |
| Cirpack  | CRPK    | Handles CDR's from Cirpack UTP's.                                     |
| Tabplg   | PLG     | Access tables from the PlugDB DBMS.                                   |

How to implement an OEM handler is out of the scope of this document.

<sub>*This page is licensed: GPLv2*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/server-usage/storage-engines/connect/connect-table-types/connect-table-types-oem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
