Operations reference#

パイプラインエラーログ機能のリファレンス。ガイドスタイルのドキュメントについては、 Pipeline error log を参照してください。

エラーログファンクション#

各パイプラインは、{source_schema}.pipeline_{pipeline_name}_errors でエラーログテーブルを維持します。これらの機能は、そのログを照会および管理するための一貫したインターフェイスを提供します。


promoteb.get_error_logs#

オプションのフィルターを使用して、パイプラインのエラーログエントリを結果ます。

パラメーター#

Parameter

Type

Default

Description

pipeline_name

TEXT

Required

パイプラインの名前。

p_source_id

TEXT

NULL

特定のソースレコードIDにフィルターします。

p_pipeline_step

SMALLINT

NULL

特定のパイプラインステップ番号にフィルターします。

p_error_category

TEXT

NULL

カテゴリによるフィルター RecordTemporary、RecordPermanent、PipelineTemporary、または`PipelinePermanent`

p_limit

INTEGER

NULL

返される行の最大数。

p_offset

INTEGER

NULL

スキップする行数ページネーションの場合。

返品#

Column

Type

Description

id

bigint

エラーログエントリID

source_id

text

失敗したソースレコード

part_ids

bigint[]

部分識別子チャンクレコードの場合

pipeline_step

smallint

障害が発生したステップ番号

step_operation

text

オペレーション名 例 ParsePdf、ChunkText

error_message

text

エラーの説明

error_category

aidb.ErrorBlocking

エラーカテゴリ

failed_at

timestamptz

障害のタイムスタンプ

retry_count

integer

リトライ試行回数

last_retry_at

timestamptz

前回の再試行のタイムスタンプ

例#

- - All errors for a pipeline
SELECT * FROM aidb.get_error_logs(my_pipeline);

- - Filter by source record
SELECT * FROM aidb.get_error_logs(my_pipeline, p_source_id => doc_42);

- - Filter by step and category
SELECT * FROM aidb.get_error_logs(
    my_pipeline,
    p_pipeline_step  => 1::smallint,
    p_error_category => RecordPermanent
);

- - Paginate
SELECT * FROM aidb.get_error_logs(my_pipeline, p_limit => 20, p_offset => 40);

helpb.get_error_log_summary#

単一のパイプラインの集計エラー数をステップ、オペレーション、およびカテゴリごとにグループ化して返します。

パラメーター#

Parameter

Type

Description

pipeline_name

TEXT

パイプラインの名前。

返品#

Column

Type

Description

pipeline_step

smallint

ステップ番号

step_operation

text

オペレーション名

error_category

text

エラーカテゴリ

error_count

bigint

このグループのエラーの数

latest_failed_at

timestamptz

最新の障害のタイムスタンプ

例#

SELECT * FROM aidb.get_error_log_summary(my_pipeline);

__OUTPUT__
 pipeline_step | step_operation | error_category  | error_count | latest_failed_at
- --------------+----------------+-----------------+-------------+----------------------------
             1 | ParsePdf       | RecordPermanent |           2 | 2026-04-10 14:31:58.456+00
             2 | ChunkText      | RecordPermanent |           1 | 2026-04-10 14:32:01.123+00
(2 rows)

promoteb.get_all_error_summaries#

aidb.get_error_log_summary() と同じロールアップを返しますが、一度にすべてのパイプラインを返します。

返品#

Column

Type

Description

pipeline_name

text

パイプライン名

pipeline_step

smallint

ステップ番号

step_operation

text

オペレーション名

error_category

text

エラーカテゴリ

error_count

bigint

このグループのエラーの数

latest_failed_at

timestamptz

最新の障害のタイムスタンプ

例#

SELECT * FROM aidb.get_all_error_summaries();

__OUTPUT__
 pipeline_name | pipeline_step | step_operation | error_category    | error_count | latest_failed_at
- --------------+---------------+----------------+-------------------+-------------+----------------------------
 my_pipeline   |             1 | ParsePdf       | RecordPermanent   |           2 | 2026-04-10 14:31:58.456+00
 pdf_ingester  |             1 | ParsePdf       | PipelinePermanent |           1 | 2026-04-10 15:00:12.000+00
(2 rows)

promoteb.clear_error_logs#

IDに基づいて特定のエラーログエントリを削除します。クリアする前にaidb.get_error_logs() でエントリを確認します。

パラメーター#

Parameter

Type

Description

pipeline_name

TEXT

パイプラインの名前。

error_ids

BIGINT[]

削除するエラーログエントリIDの配列。

返品#

INTEGER — 削除された行数。

例#

SELECT aidb.clear_error_logs(my_pipeline, ARRAY[1, 3]);

__OUTPUT__
 clear_error_logs
- -----------------
                2
(1 row)

promoteb.retry_pipeline_errors#

!!!注 aidb.retry_pipeline_errors() はまだ利用できません。将来のリリースに含まれる予定です。 Known issues を参照してください。

特定のエラーログエントリを、最初に失敗したステップから再処理します。

パラメーター#

Parameter

Type

Description

pipeline_name

TEXT

パイプラインの名前。

error_ids

BIGINT[]

再試行するエラーログエントリIDの配列。

返品#

Column

Type

Description

error_id

bigint

エラーログエントリID

status

text

resolved`または`failed

error_message

text

失敗の理由 解決された場合は空

解決されたエントリはエラーログから削除されます。失敗した再試行は、インクリメントされたretry_count および更新されたlast_retry_at とともに残ります。

例#

SELECT * FROM aidb.retry_pipeline_errors(my_pipeline, ARRAY[1, 2]);

__OUTPUT__
 error_id | status   | error_message
- ---------+----------+----------------------------------
        1 | resolved |
        2 | failed   | failed to extract text from page 0
(2 rows)

エラーカテゴリ#

Category

Scope

Blocks pipeline?

Description

RecordTemporary

Single record

No

1つのレコードの一時的な障害。再試行で成功する場合があります。

RecordPermanent

Single record

No

1つのレコードの永続的な障害たとえば、破損したデータ。

PipelineTemporary

Entire step

Yes

ステップを停止した一時的な障害たとえば、サービスの停止。再試行で解決される場合があります。

PipelinePermanent

Entire step

Yes

ステップを停止した永続的な障害たとえば、無効なモデル構成。