- Schema:
CLASS_ INSTANCES view¶
Important
This view is only available in the organization account. For more information, see Premium views in the organization account.
This Organization Usage view displays a row for each instance of a class defined in the account.
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 |
|---|---|---|
| ID | NUMBER | Internal/system-generated identifier for the instance. |
| NAME | VARCHAR | Name of the instance. |
| SCHEMA_ID | NUMBER | Internal/system-generated identifier for the schema of the instance. |
| SCHEMA_NAME | VARCHAR | Name of the schema the instance belongs to. |
| DATABASE_ID | NUMBER | Internal/system-generated identifier for the database of the instance. |
| DATABASE_NAME | VARCHAR | Name of the database the instance belongs to. |
| CLASS_ID | NUMBER | Internal/system-generated identifier for the class the instance is instantiated from. |
| CLASS_NAME | VARCHAR | Name of the class the instance is instantiated from. |
| CLASS_SCHEMA_ID | NUMBER | Internal/system-generated identifier for the schema of the class the instance is instantiated from. |
| CLASS_SCHEMA_NAME | VARCHAR | Name of the schema of the class the instance is instantiated from. |
| CLASS_DATABASE_ID | NUMBER | Internal/system-generated identifier for the database of the class the instance is instantiated from. |
| CLASS_DATABASE_NAME | VARCHAR | Name of the database of the class the instance is instantiated from. |
| OWNER_NAME | VARCHAR | Name of the role that owns the instance. |
| OWNER_ROLE_TYPE | VARCHAR | The internal/system-generated identifier of the role that owns the instance of the class. |
| CREATED | TIMESTAMP_LTZ | Date and time when the instance was created. |
| DELETED | TIMESTAMP_LTZ | Date and time when the instance was deleted. |
| COMMENT | VARCHAR | Comment for the instance. |
Usage notes¶
- Latency for the view may be up to 24 hours.
- The view only displays the instances for which the current role for the session has been granted access privileges.
Examples¶
The following example finds all instances of the ANOMALY_DETECTION class:
The following example joins this view with TABLES view on the INSTANCE_ID column to find the tables that belong to each instance: