- Schema:
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 Name | Data Type | Description |
|---|---|---|
| ORGANIZATION_NAME | VARCHAR | Name of the organization. |
| ACCOUNT_LOCATOR | VARCHAR | System-generated identifier for the account. |
| ACCOUNT_NAME | VARCHAR | User-defined identifier for the account. |
Additional columns
| Column Name | Data Type | Description |
|---|---|---|
| START_TIME | TIMESTAMP_LTZ | Start of the time (in the local time zone) range in which data migration took place. |
| END_TIME | TIMESTAMP_LTZ | End of the time (in the local time zone) range in which data migration took place. |
| CREDITS_USED | FLOAT | Number of credits billed for Snowpipe Streaming data migration during the START_TIME and END_TIME window. |
| NUM_BYTES_MIGRATED | NUMBER | Number of bytes migrated during the START_TIME and END_TIME window. |
| NUM_ROWS_MIGRATED | NUMBER | Number of rows migrated during the START_TIME and END_TIME window. |
| TABLE_ID | NUMBER | Internal/system-generated identifier for the target table that the Snowpipe Streaming client loads data into. |
| TABLE_NAME | VARCHAR | The name of the target table that the Snowpipe Streaming client loads data into. |
| SCHEMA_ID | NUMBER | Internal/system-generated identifier for the schema that the target table belongs to. |
| SCHEMA_NAME | VARCHAR | The name of the schema that the target table belongs to. |
| DATABASE_ID | NUMBER | Internal/system-generated identifier for the database that the target table belongs to. |
| DATABASE_NAME | VARCHAR | The 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.