スキーマ:

ACCOUNT_USAGE

PIPES ビュー

このAccount Usageビューには、アカウントで定義された各パイプの行が表示されます。

列名

データ型

説明

PIPE_ID

NUMBER

Internal or system-generated identifier for the pipe.

PIPE_NAME

VARCHAR

The name of the pipe object.

For manually created pipes, this is the name defined in the CREATE PIPE statement.

For the Snowpipe Streaming high-performance default pipe, this is derived from the target table name; for example, MY_TABLE-STREAMING.

PIPE_SCHEMA_ID

NUMBER

Internal or system-generated identifier for the schema that the pipe belongs to.

For the default pipe, this corresponds to the target table's schema ID.

PIPE_SCHEMA

VARCHAR

パイプが属するスキーマ。

For the default pipe, this corresponds to the target table's schema.

PIPE_CATALOG_ID

NUMBER

Internal or system-generated identifier for the database that the pipe belongs to.

For the default pipe, this corresponds to the target table's database ID.

PIPE_CATALOG

VARCHAR

Name of the database that the pipe belongs to.

For the default pipe, this corresponds to the target table's database.

IS_AUTOINGEST_ENABLED

VARCHAR

パイプに対して AUTO-INGEST が有効になっているかどうか。将来の機能を表します。

NOTIFICATION_CHANNEL_NAME

VARCHAR

DEFINITION 列で指定されたステージのAmazon SQS キューのAmazonリソース名。将来の機能を表します。

PIPE_OWNER

VARCHAR

パイプを所有するロールの名前。

Returns NULL for the default pipe.

DEFINITION

VARCHAR

キューファイルからSnowflakeテーブルにデータをロードするために使用される COPY ステートメント。

CREATED

TIMESTAMP_LTZ

パイプの作成時間。

LAST_ALTERED

TIMESTAMP_LTZ

オブジェクトが DML、 DDL、 またはバックグラウンドでのメタデータ処理によって最後に変更された日時。 使用上の注意 をご参照ください。

COMMENT

VARCHAR

このパイプのコメント。

Returns the following message for the default pipe: "Default pipe for Snowpipe Streaming High Performance ingestion to a table. Created and managed by Snowflake."

PATTERN

VARCHAR

コピーオプションが指定されていた場合、パイプ定義の COPY INTO <テーブル> ステートメントの PATTERN コピーオプション値。

DELETED

TIMESTAMP_LTZ

パイプが削除された日時。

OWNER_ROLE_TYPE

VARCHAR

The type of role that owns the object; for example, ROLE.

If a Snowflake Native App owns the object, the value is APPLICATION.

Snowflake returns NULL if you delete the object because a deleted object doesn't have an owner role.

Returns NULL for the default pipe.

使用上の注意

  • ビューの待機時間は最大180分(3時間)です。

  • ビューには、セッションの現在のロールにアクセス権限が付与されているオブジェクトのみが表示されます。

  • ビューは MANAGE GRANTS 権限を認識せず、MANAGE GRANTS 権限を持つユーザーによって実行された SHOW コマンドと比較してより少ない情報が表示される場合があります。

  • LAST_ALTERED 列は、オブジェクトに対して以下の操作を実行したときに更新されます。

    • DDL 操作 。

    • DML 操作(テーブル用のみ)。この列は、 DML ステートメントによって影響を受ける行がない場合でも更新されます。

    • Snowflakeが実行するメタデータのバックグラウンド保守作業。

次の例では、このビューを PIPE_ID 列の PIPE_USAGE_HISTORY ビュー に結合して、一意の各 PIPE オブジェクトに関連付けられたクレジット使用状況を追跡します。

select a.PIPE_CATALOG as PIPE_CATALOG,
       a.PIPE_SCHEMA as PIPE_SCHEMA,
       a.PIPE_NAME as PIPE_NAME,
       b.CREDITS_USED as CREDITS_USED
from SNOWFLAKE.ACCOUNT_USAGE.PIPES a join SNOWFLAKE.ACCOUNT_USAGE.PIPE_USAGE_HISTORY b
on a.pipe_id = b.pipe_id
where b.START_TIME > date_trunc(month, current_date);
Copy