Account resources
account
AccountProvider
Account-scoped provider — deploys account-level objects (warehouses, roles, etc.).
Never imported inside a stored procedure. Used only by the CLI in CI/CD context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Any
|
Active Snowpark |
required |
Source code in src/pinky_provider/resources/account/__init__.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
apply(manifest)
Apply the manifest at account scope — creates or alters each declared object.
Returns the diff list actually executed, so the CLI can render what happened.
Source code in src/pinky_provider/resources/account/__init__.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
plan(manifest)
Compute changes without applying them.
Source code in src/pinky_provider/resources/account/__init__.py
69 70 71 | |
database
warehouse
Warehouse
Bases: BaseResource
Account-scoped warehouse — fields introspected from snowflake.core.warehouse.Warehouse.
Deployed via Core API create_or_alter (ADR-0005) — no SQL fallback needed. Two SDK warts are
curated for a clean YAML surface (ADR-0015): warehouse_size is exposed as :class:WarehouseSize
(autocompleted, typo-checked) and auto_resume as a real bool.
Source code in src/pinky_provider/resources/account/warehouse.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
collection(root)
Account-level warehouse collection.
Source code in src/pinky_provider/resources/account/warehouse.py
70 71 72 | |
WarehouseSize
Bases: StrEnum
Curated warehouse sizes — drives YAML autocomplete (ADR-0015).
Snowflake's SDK types warehouse_size as a bare str; exposing this enum gives the editor
a value dropdown. Used as a soft enum (WarehouseSize | str): unknown values still pass —
forward-compatible if Snowflake adds a tier before we do — and are validated by Snowflake at
apply. Extend by one line to get autocomplete for a new tier.
Source code in src/pinky_provider/resources/account/warehouse.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |