Schema:

ACCOUNT_USAGE

PIPES View¶

This Account Usage view displays a row for each pipe defined in the account.

Columns¶

Column Name

Data Type

Description

PIPE_ID

NUMBER

Internal/system-generated identifier for the pipe.

PIPE_NAME

TEXT

Name of the pipe.

PIPE_SCHEMA_ID

NUMBER

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

PIPE_SCHEMA

TEXT

Schema that the pipe belongs to.

PIPE_CATALOG_ID

NUMBER

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

PIPE_CATALOG

TEXT

Database that the pipe belongs to.

IS_AUTOINGEST_ENABLED

TEXT

Whether AUTO-INGEST is enabled for the pipe. Represents future functionality.

NOTIFICATION_CHANNEL_NAME

TEXT

Amazon Resource Name of the Amazon SQS queue for the stage named in the DEFINITION column. Represents future functionality.

PIPE_OWNER

TEXT

Name of the role that owns the pipe.

DEFINITION

TEXT

COPY statement used to load data from queued files into a Snowflake table.

CREATED

TIMESTAMP_LTZ

Creation time of the pipe.

LAST_ALTERED

TIMESTAMP_LTZ

Date and time the object was last altered. See Usage Notes.

COMMENT

TEXT

Comment for this pipe.

PATTERN

TEXT

PATTERN copy option value in the COPY INTO <table> statement in the pipe definition, if the copy option was specified.

DELETED

TIMESTAMP_LTZ

Date and time when the pipe was deleted.

OWNER_ROLE_TYPE

TEXT

The type of role that owns the object, either ROLE or DATABASE_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 does not have an owner role.

Usage Notes¶

  • Latency for the view may be up to 180 minutes (3 hours).

  • The view only displays objects for which the current role for the session has been granted access privileges.

  • The view does not recognize the MANAGE GRANTS privilege and consequently may show less information compared to a SHOW command executed by a user who holds the MANAGE GRANTS privilege.

  • The LAST_ALTERED column is updated when the following operations are performed on an object:

    • DDL operations.

    • DML operations (for tables only).

    • Background maintenance operations on metadata performed by Snowflake.

Examples¶

The following example joins this view with PIPE_USAGE_HISTORY view on the PIPE_ID column to track the credit usage associated with each unique PIPE object:

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