UpdateDatabaseTable 2025.10.2.19

バンドル

org.apache.nifi | nifi-standard-nar

説明

このプロセッサーは、 JDBC 接続と受信記録を使用して、受信記録をサポートするために必要なデータベーステーブルの変更を生成します。これは「フラット」な記録レイアウトを想定しており、最上位の記録フィールドには列そのものとなるようなネストされたフィールドはありません。

タグ

変更、データベース、jdbc、メタデータ、テーブル、更新

入力要件

REQUIRED

機密動的プロパティをサポート

false

プロパティ

プロパティ

説明

列名変換パターン

列名はこの正規表現で正規化されます。

列名 翻訳ストラテジー

テーブルの列名を正規化するために使用されるストラテジー。大文字と小文字を区別しないマッチングを行うため、ストラテジーに関係なく列名は大文字になります。

データベース方言サービス

特定のサービスやベンダーに特化したステートメントを生成するためのデータベース方言サービス。

db-type

Database Type for generating statements specific to a particular service or vendor. The Generic Type supports most cases but selecting a specific type enables optimal processing or additional features.

record-reader

受信フローファイルを読み込むサービス。リーダーは記録のスキーマを決定するためだけに使用され、実際の記録は処理されません。

updatedatabasetable-catalog-name

ステートメントが更新するカタログ名。更新対象のデータベースには適用されない場合があります。この場合、フィールドは空欄のままにしてください。このプロパティがセットされていてデータベースが大文字と小文字を区別する場合、カタログ名はデータベースのカタログ名と正確に一致しなければならないことに注意してください。

updatedatabasetable-create-table

ターゲット・テーブルが存在しない場合の処理方法を指定します(作成、失敗など)。

updatedatabasetable-dbcp-service

データベースへの接続を取得するために使用するController Service。

updatedatabasetable-primary-keys

データベース内の行を一意に識別する記録フィールド名のカンマ区切りリスト。このプロパティは、指定されたテーブルを作成する必要がある場合にのみ使用されます。この場合、キーフィールドが新しく作成されるテーブルのプライマリキーを指定するために使用されます。IMPORTANT: プライマリ・キー・フィールドは、 'Quote Column Identifiers' が False でデータベースが大文字と小文字を区別しないカラム名を許可していない限り、記録フィールド名と正確に一致する必要があります。実際には、記録フィールド名と完全に一致する主キーフィールドを指定するのがベストです。これらは作成されるテーブルの列名になります。

updatedatabasetable-query-timeout

ドライバーがクエリの実行を待つ秒数をセットします。値0はタイムアウトなしを意味します。NOTE: ゼロ以外の値はドライバーでサポートされていない可能性があります。

updatedatabasetable-quoted-column-identifiers

このオプションを有効にすると、すべての列名が引用符で囲まれるようになり、予約語をテーブルの列名として使用できるようになります。また/もしくは記録フィールド名が列名と完全に一致するよう強制します。

updatedatabasetable-quoted-table-identifiers

このオプションを有効にすると、テーブル名の特殊文字の使用をサポートするためにテーブル名が引用符で囲まれるようになり、Table Nameプロパティの値がターゲット・テーブル名と完全に一致するように強制されます。

updatedatabasetable-record-writer

Specifies the Controller Service to use for writing results to a FlowFile. The Record Writer should use Inherit Schema to emulate the inferred schema behavior, i.e. an explicit schema need not be defined in the writer, and will be supplied by the same logic used to infer the schema from the column types. If Create Table Strategy is set 'Create If Not Exists', the Record Writer 's output format must match the Record Reader's format in order for the data to be placed in the created table location. Note that this property is only used if 'Update Field Names' is set to true and the field names do not all match the column names exactly. If no update is needed for any field names (or 'Update Field Names' is false), the Record Writer is not used and instead the input FlowFile is routed to success or failure without modification.

updatedatabasetable-schema-name

テーブルが属するデータベース・スキーマの名前。更新対象のデータベースには適用されない場合があります。この場合、フィールドは空欄のままにしてください。このプロパティがセットされていてデータベースが大文字と小文字を区別する場合、スキーマ名はデータベースのスキーマ名と正確に一致しなければならないことに注意してください。

updatedatabasetable-table-name

更新するデータベース・テーブルの名前。テーブルが存在しない場合は、Create Tableプロパティの値に応じて、テーブルが作成されるか、エラーがスローされます。

updatedatabasetable-translate-field-names

true の場合、ターゲットテーブルの列としてフィールド名が存在するかどうかを決定するために、プロセッサーはフィールド名を指定されたテーブルの対応する列名に変換しようとします。NOTE: ターゲット・テーブルが存在せず、作成される場合、このプロパティは無視され、フィールド名はそのまま使用されます。falseの場合、フィールド名は列名と完全に一致しなければなりません。そうでなければ列が見つからず、代わりにその列が既に存在するというエラーが報告されるかもしれません。

updatedatabasetable-update-field-names

This property indicates whether to update the output schema such that the field names are set to the exact column names from the specified table. This should be used if the incoming record field names may not match the table 's column names in terms of upper- and lower-case. For example, this property should be set to true if the output FlowFile is destined for Oracle e.g., which expects the field names to match the column names exactly. NOTE: The value of the'Translate Field Names' property is ignored when updating field names; instead they are updated to match the column name as returned by the database.

リレーションシップ

名前

説明

failure

FlowFile 記録がデータベースに送信できなかった場合に、このリレーションシップにルーティングされた記録を含むコンテナー。

success

FlowFile 記録がデータベースに正常に送信された後、このリレーションシップにルーティングされた記録を含むコンテナー。

属性の書き込み

名前

説明

output.table

この属性は、'success' および 'failure' リレーションシップにルーティングされるフロー・ファイルに書き込まれ、ターゲット・テーブル名を含みます。

output.path

この属性は、'success' と 'failure' のリレーションシップにルーティングされるフローファイルに書き込まれ、ファイルシステム上のテーブルへのパス(テーブルがパーティショニングされている場合はパーティションの場所)を含みます。

mime.type

Record Writerが指定され、Update Field Namesが「true」の場合のみ、mime.type属性をRecord Writerで指定された MIME Typeにセットします。

record.count

Record Writer が指定され、Update Field Names が 「true」 の場合のみ、 FlowFile の記録数をセットします。