snowflake.core.pipe.PipeResource | Snowflake Documentation (original) (raw)
class snowflake.core.pipe.PipeResource(name: str, collection: PipeCollection)¶
Bases: SchemaObjectReferenceMixin
[PipeCollection]
Represents a reference to a Snowflake pipe.
With this pipe reference, you can fetch information about pipes, as well as perform certain actions on them.
Attributes
database¶
The DatabaseResource this reference belongs to.
fully_qualified_name¶
Return the fully qualified name of the object this reference points to.
root¶
The Root object this reference belongs to.
Methods
drop(if_exists: bool | None = None) → None¶
Drop this pipe.
Parameters:
if_exists (bool , optional) – Check the existence of this pipe before dropping it. Default is None
, which is equivalent to False
.
Examples
Deleting a pipe using its reference:
pipe_reference.drop()
Using a pipe reference to delete a pipe if it exists:
pipe_reference.drop(if_exists=True)
drop_async(if_exists: bool | None = None) → PollingOperation[None]¶
An asynchronous version of drop().
Refer to PollingOperation for more information on asynchronous execution and the return type.
Fetch the details of a pipe resource.
Examples
Fetching a pipe using its reference:
pipe = pipe_reference.fetch()
Accessing information of the pipe with pipe instance.
print(pipe.name, pipe.comment)
fetch_async() → PollingOperation[Pipe]¶
An asynchronous version of fetch().
Refer to PollingOperation for more information on asynchronous execution and the return type.
refresh(if_exists: bool | None = None, prefix: str | None = None, modified_after: datetime | None = None) → None¶
Refresh this pipe.
Parameters:
- if_exists (bool , optional) – Check the existence of this pipe before refreshing it. Default is
None
, which is equivalent toFalse
. - prefix (str , optional) – Path (or prefix) appended to the stage reference in the pipe definition.
- modified_after (datetime , optional) – Timestamp (in ISO-8601 format) of the oldest data files to copy into the Snowpipe ingest queue based on the LAST_MODIFIED date (i.e. date when a file was staged).
Examples
Using a pipe reference to refresh it:
pipe_reference.refresh(prefix="your_prefix")
refresh_async(if_exists: bool | None = None, prefix: str | None = None, modified_after: datetime | None = None) → PollingOperation[None]¶
An asynchronous version of refresh().
Refer to PollingOperation for more information on asynchronous execution and the return type.