- スキーマ:
PIPES ビュー¶
重要
この表示は組織アカウントでのみ利用可能です。詳細については、 組織アカウントのプレミアムビュー をご参照ください。
このOrganization Usageビューは、アカウントに定義された各パイプの行を表示します。
列¶
組織レベルの列
列名 |
データ型 |
説明 |
|---|---|---|
ORGANIZATION_NAME |
VARCHAR |
組織の名前。 |
ACCOUNT_LOCATOR |
VARCHAR |
システムが生成したアカウントの識別子。 |
ACCOUNT_NAME |
VARCHAR |
ユーザー定義のアカウント識別子。 |
追加列
列名 |
データ型 |
説明 |
|---|---|---|
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, |
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. |
使用上の注意¶
ビューの遅延は最大24時間です。
ビューには、セッションの現在のロールにアクセス権が付与されているオブジェクトのみが表示されます。
ビューは 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.ORGANIZATION_USAGE.PIPES a join SNOWFLAKE.ORGANIZATION_USAGE.PIPE_USAGE_HISTORY b
on a.pipe_id = b.pipe_id
where b.START_TIME > date_trunc(month, current_date);