- Categories:
System functions (System Control)
SYSTEM$SET_ ZEROCOPY_ METADATA_ AUTO_ REFRESH_ INTERVAL¶
Sets the metadata auto-refresh interval of a Zero-Copy connector.
The refresh interval is a property of the connector. It applies to every catalog-linked database that is mounted from the connector.
It controls how often Snowflake checks the partner for updated table metadata, so that queries on the mounted tables reflect
the partner’s latest committed changes. The data itself stays with the partner and isn’t copied. The interval is separate from the
SYNC_INTERVAL_SECONDS property of a catalog-linked database, which controls how often Snowflake discovers new and removed
schemas and tables. For that property, see ALTER DATABASE (zero-copy connector-linked).
Syntax¶
Arguments¶
connector_nameThe name of the Zero-Copy connector. Specify it as a string literal enclosed in single quotes.
You can use a fully qualified name (
<db>.<schema>.<connector>) or a partially qualified name.refresh_intervalThe interval, as a string literal. Specify a whole number followed by a unit, with an optional space between them:
- Seconds:
s,second, orseconds - Minutes:
m,minute, orminutes - Hours:
h,hour, orhours - Days:
d,day, ordays
For example,
30s,5m,10 minutes,1h,2 hours, or1d.Combined units (for example,
1h30m) aren’t supported. The interval must be between 30 seconds and 1 day.- Seconds:
Returns¶
Returns a string that confirms the change.
Usage notes¶
- The change applies to every catalog-linked database mounted from the connector.
- The default interval, which applies until you change it, depends on the partner:
| Partner | Default interval |
|---|---|
| SAP® BDC | 30 seconds |
| Salesforce | 30 seconds |
| Workday | 4 hours |
Note
Existing SAP® BDC Zero-Copy connectors might have a different interval. To see the interval of a connector, call SYSTEM$GET_ZEROCOPY_METADATA_AUTO_REFRESH_INTERVAL.
- A shorter interval makes the mounted tables pick up the partner’s latest table metadata sooner. It doesn’t affect how quickly new schemas and tables are discovered. To change that, use ALTER DATABASE … UPDATE LINKED_ZEROCOPY_CONNECTOR, or use SYSTEM$SYNC_ZEROCOPY_OBJECTS to run one discovery cycle immediately.
- The function fails if the value isn’t in an accepted format or is outside the allowed range.
Access control requirements¶
A role used to execute this operation must have the MODIFY privilege on the Zero-Copy connector.
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
Examples¶
Check the current interval, then refresh every 5 minutes: