- Schema:
For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).
EXTERNAL_ ACCESS_ 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.
The EXTERNAL_ACCESS_HISTORY view in the ORGANIZATION_USAGE schema can be used to query the history of external access performed by procedure or UDF handler code across accounts in your organization within the last 365 days (1 year).
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 |
|---|---|---|
| QUERY_ID | TEXT | ID of the query or job that called the UDF or procedure performing external access. |
| HOSTNAMES | TEXT | Host names accessed, returned as a JSON array. |
| STATUS | TEXT | Status of the attempt to connect to the external location. One of the following values:
|
| IP | TEXT | IP address for the external network location. |
| SOURCE_CLOUD | TEXT | Name of the cloud provider where the data transfer originated. One of the following:
|
| SOURCE_REGION | TEXT | Region where the data transfer originated. |
| TARGET_CLOUD | TEXT | Name of the cloud provider to which the data was sent. One of the following:
|
| TARGET_REGION | TEXT | Region to which the data was sent. internet for regions not on a cloud provider. |
| SENT_BYTES | NUMBER | Number of bytes sent to the external endpoint. |
| RECEIVED_BYTES | NUMBER | Number of bytes received from the external endpoint. |
Usage notes¶
- Each row in the view represents a single IP address that the procedure or UDF accesses. As a result, there might be multiple rows with different IP addresses, but with the same query ID. There might also be multiple hostnames mapped to the same IP address.
- Latency for the view may be up to 180 minutes (3 hours).
- The data is retained for 365 days (1 year).
Examples¶
Retrieve denied external access attempts: