Schema:

ORGANIZATION_USAGE

For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).

SNOWPIPE_STREAMING_FILE_MIGRATION_HISTORY view

Important

This view is only available in the organization account. For more information, see Premium views in the organization account.

Organization Usage performance

When you query a specific view in the SNOWFLAKE.ORGANIZATION_USAGE schema, follow the organization-wide guidance in Performance (Organization Usage): bound every scan on history views, list columns explicitly, and use the time filter column table plus worked SQL and anti-patterns there.

This Organization Usage view can be used to query the history of data migrated into Snowflake tables using Snowpipe Streaming within the last 365 days (1 year). The view displays the number of rows and bytes migrated and credits used for migration billed for accounts in your organization.

Columns

Organization-level columns

Column NameData TypeDescription
ORGANIZATION_NAMEVARCHARName of the organization.
ACCOUNT_LOCATORVARCHARSystem-generated identifier for the account.
ACCOUNT_NAMEVARCHARUser-defined identifier for the account.

Additional columns

Column NameData TypeDescription
START_TIMETIMESTAMP_LTZStart of the time (in the local time zone) range in which data migration took place.
END_TIMETIMESTAMP_LTZEnd of the time (in the local time zone) range in which data migration took place.
CREDITS_USEDFLOATNumber of credits billed for Snowpipe Streaming data migration during the START_TIME and END_TIME window.
NUM_BYTES_MIGRATEDNUMBERNumber of bytes migrated during the START_TIME and END_TIME window.
NUM_ROWS_MIGRATEDNUMBERNumber of rows migrated during the START_TIME and END_TIME window.
TABLE_IDNUMBERInternal/system-generated identifier for the target table that the Snowpipe Streaming client loads data into.
TABLE_NAMEVARCHARThe name of the target table that the Snowpipe Streaming client loads data into.
SCHEMA_IDNUMBERInternal/system-generated identifier for the schema that the target table belongs to.
SCHEMA_NAMEVARCHARThe name of the schema that the target table belongs to.
DATABASE_IDNUMBERInternal/system-generated identifier for the database that the target table belongs to.
DATABASE_NAMEVARCHARThe name of the database that the target table belongs to.

Usage notes

  • Latency for the view may be up to 14 hours.
  • Note that file migration sometimes may be pre-empted by clustering or other DML operations. Migration may not always occur and therefore the migration history will be empty even after 12 hours.

  • The NUM_BYTES_MIGRATED and NUM_ROWS_MIGRATED columns only show the number of bytes and rows processed during the migration process. These numbers may not equal the actual numbers of rows and bytes inserted by Snowpipe Streaming to the table because some rows and bytes are processed outside of the migration process due to clustering or other DML operations.

    For example, Snowpipe Streaming inserts 1M rows and the table has 1M rows, but the NUM_ROWS_MIGRATED column in the migration history view only shows 800K rows. This is because the other 200K rows are processed outside of the migration process.