このコンテンツは選択した言語では利用できません。

13.13. File Translator


13.13.1. File Translator

The file translator 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. See Section 3.6.7, “Nested Tables: TEXTTABLE” and Section 3.6.8, “Nested Tables: XMLTABLE”.
The file translator is implemented by the org.teiid.translator.file.FileExecutionFactory class and known by the translator type name file.

Note

The resource adapter for this translator is provided by configuring the file data source in the JBoss EAP instance. See the Red Hat JBoss Data Virtualization Administration and Configuration Guide for more configuration information.

13.13.2. File Translator: Execution Properties

Expand
Table 13.7. Execution Properties
Name Description Default
Encoding The encoding that must 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 in previous releases)

13.13.3. File Translator: Usage

Retrieve all files as BLOBs with an optional extension at the given path.
call getFiles('path/*.ext')
Copy to Clipboard Toggle word wrap
If the extension path is specified, then it will filter all of the files 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 does not 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')
Copy to Clipboard Toggle word wrap
getTextFiles will retrieve the same files as getFiles, only the results will be CLOB values using the encoding execution property as the character set.
Save the CLOB, BLOB, or XML value to the given path.
call saveFile('path', value)
Copy to Clipboard Toggle word wrap
The path is a reference to either a new file location or an existing file to overwrite completely.

Note

Native or direct query execution is not supported on the File Translator.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat