JBoss Community Archive (Read Only)

Teiid 8.12

File Translator

The file translator, known by the type name file, exposes stored procedures to leverage file system resources exposed by the file resource adapter. It will commonly be used with the TEXTTABLE or XMLTABLE table functions to use CSV or XML formatted data.

Execution Properties





The encoding that should be used for CLOBs returned by the getTextFiles procedure

The system default encoding


Throw an exception in getFiles or getTextFiles if the specified file/directory does not exist.

true (false prior to 8.2)


Retrieve all files as BLOBs with an optional extension at the given path.

call getFiles('path/*.ext')

If the extension path is specified, then it will filter all of the file in the directory referenced by the base path. If the extension pattern is not specified and the path is a directory, then all files in the directory will be returned. Otherwise the single file referenced will be returned. If the path doesn't exist, then no results will be returned if ExceptionIfFileNotFound is false, otherwise an exception will be raised.

Retrieve all files as CLOB(s) with the an optional extension at the given path.

call getTextFiles('path/*.ext')

All the same files a getFiles will be retrieved, the only difference is that the results will be CLOB values using the encoding execution property as the character set.

Save the CLOB, BLOB, or XML value to given path

call saveFile('path', value)

The path should reference a new file location or an existing file to overwrite completely.

Native queries

Native or direct query execution is not supported on the File Translator.

JCA Resource Adapter

The resource adapter for this translator provided through "File Data Source", Refer to Admin Guide for configuration information.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 12:26:57 UTC, last content change 2013-10-10 14:55:28 UTC.