h1. {color:#000000}{*}File Translator{*}{color} |
h1. *File Translator* |
|
{color:#333333}The file translator, known by the type name {color}{color:#333333}{_}file{_}{color}{color:#333333}, 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.{color} |
|
{color:#333333}{*}Execution Properties{*}{color} || {color:#000000}Name{color} || {color:#000000}Description{color} || {color:#000000}Default{color} || | {color:#333333}Encoding{color} | {color:#333333}The encoding that should be used for CLOBs returned by the getTextFiles procedure{color} | {color:#333333}The system default encoding{color} | | {color:#333333}ExceptionIfFileNotFound{color} | {color:#333333}Throw an exception in getFiles or getTextFiles if the specified file/directory does not exist.{color} | {color:#333333}true (false prior to 8.2){color} | |
*Execution Properties* || Name || Description || Default || | Encoding | The encoding that should be used for CLOBs returned by the getTextFiles procedure | The system default encoding | | ExceptionIfFileNotFound | Throw an exception in getFiles or getTextFiles if the specified file/directory does not exist. | true (false prior to 8.2) | |
|
h3. {color:#000000}{*}Usage{*}{color} *Usage* |
|
{color:#333333}Retrieve all files as BLOBs with an optional extension at the given path.{color} |
{code:SQL}call getFiles('path/*.ext'){code} |
{color:#333333}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.{color} |
|
{color:#333333}Retrieve all files as CLOB(s) with the an optional extension at the given path.{color} |
{code:SQL}call getTextFiles('path/*.ext'){code} |
{color:#333333}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.{color} |
|
{color:#333333}Save the CLOB, BLOB, or XML value to given path{color} |
{code:SQL}call saveFile('path', value){code} |
{color:#333333}The path should reference a new file location or an existing file to overwrite completely.{color} |
{info:title=Native queries} |
{color:#333333}Native or direct query execution is not supported on the File Translator.{color}{info} |
|
h3. {color:#000000}{*}JCA Resource Adapter{*}{color} |
h3. *JCA Resource Adapter* |
|
{color:#333333}The resource adapter for this translator provided through "File Data Source", Refer to Admin Guide for configuration information.{color} |
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
Name | Description | Default |
---|---|---|
Encoding | The encoding that should be used for CLOBs returned by the getTextFiles procedure | The system default encoding |
ExceptionIfFileNotFound | 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. |
The resource adapter for this translator provided through "File Data Source", Refer to Admin Guide for configuration information.