provider
Provider
Full-scope provider — assembles schema, database, and account resources.
Entry point for CLI and CI/CD pipelines. Never use inside a stored procedure (imports the full resource graph including account-level objects).
The manifest's scope selects which sub-provider runs. Only account scope is wired in
this first slice; schema and database follow.
Example
.. code-block:: python
from pinky_provider import Provider
provider = Provider(session)
provider.plan(source="manifest.yml", env="SANDBOX")
provider.apply(source="manifest.yml", env="SANDBOX")
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Any
|
Active Snowpark |
required |
Source code in src/pinky_provider/provider.py
12 13 14 15 16 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 | |
apply(source, target=None, env='SANDBOX', vars=None)
Apply the manifest — deploys or alters all declared objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Path to |
required |
target
|
str | None
|
Target schema as |
None
|
env
|
str
|
Environment selecting |
'SANDBOX'
|
vars
|
dict[str, str] | None
|
Variable overrides injected into the manifest. |
None
|
Returns:
| Type | Description |
|---|---|
list[ResourceDiff]
|
The diffs actually executed. |
Source code in src/pinky_provider/provider.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
plan(source, target=None, env='SANDBOX', vars=None)
Compute the full change plan without applying anything.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Path to |
required |
target
|
str | None
|
Target schema as |
None
|
env
|
str
|
Environment selecting |
'SANDBOX'
|
vars
|
dict[str, str] | None
|
Variable overrides injected into the manifest. |
None
|
Returns:
| Type | Description |
|---|---|
list[ResourceDiff]
|
Ordered list of :class: |
Source code in src/pinky_provider/provider.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |