snowflake.core.pipe.PipeCollection¶
- class snowflake.core.pipe.PipeCollection(schema: SchemaResource)¶
Bases:
PipeCollectionBase
Represents the collection operations of the Snowflake Pipe resource.
With this collection, you can create, iterate through, and search for pipes that you have access to in the current context.
Examples
Creaing a pipe instance:
>>> pipes = root.databases["my_db"].schemas["my_schema"].pipes >>> new_pipe = Pipe( ... name="my_pipe", ... comment="This is a pipe") >>> pipes.create(new_pipe)
Attributes
- database¶
The DatabaseResource this collection belongs to.
- root¶
The Root object this collection belongs to.
Methods
- create(pipe: Pipe, mode: CreateMode | str | None = None) PipeResource ¶
Create a pipe.
- Parameters:
pipe (Pipe) – (required)
mode (Union[CreateMode, str]) – Parameter allowing support for different modes of resource creation. Possible values include: - errorIfExists: Throws an error if you try to create a resource that already exists. - orReplace: Automatically replaces the existing resource with the current one. - ifNotExists: Creates a new resource when an alter is requested for a non-existent resource.
- create_async(pipe: Pipe, mode: CreateMode | str | None = None) PollingOperation[PipeResource] ¶
An asynchronous version of
create()
.Refer to
PollingOperation
for more information on asynchronous execution and the return type.
- items() ItemsView[str, T] ¶
- iter(*, like: str | None = None) Iterator[Pipe] ¶
List pipes.
- Parameters:
like (str) – Parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.
- iter_async(*, like: str | None = None) PollingOperation[Iterator[Pipe]] ¶
An asynchronous version of
iter()
.Refer to
PollingOperation
for more information on asynchronous execution and the return type.
- keys() KeysView[str] ¶
- update_reference(old_name: str, new_name: str, resource: T) None ¶
Update the collection with a new item.
- values() ValuesView[T] ¶