Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 StackQL Studios

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 21 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@stackql/provider-utils": "^0.2.2"
"@stackql/provider-utils": "^0.4.6"
},
"engines": {
"node": ">=14.16.0"
Expand Down
2 changes: 1 addition & 1 deletion provider-dev/docgen/provider-data/headerContent1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords:
- cloud inventory
description: Query, deploy and manage Snowflake resources using SQL
custom_edit_url: null
image: /img/providers/snowflake/stackql-snowflake-provider-featured-image.png
image: /img/stackql-snowflake-provider-featured-image.png
id: 'provider-intro'
---

Expand Down
2 changes: 1 addition & 1 deletion website/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords:
- cloud inventory
description: Query, deploy and manage Snowflake resources using SQL
custom_edit_url: null
image: /img/providers/snowflake/stackql-snowflake-provider-featured-image.png
image: /img/stackql-snowflake-provider-featured-image.png
id: 'provider-intro'
---

Expand Down
21 changes: 12 additions & 9 deletions website/docs/services/account/accounts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Successful request.
<tr>
<td><CopyableCode code="name" /></td>
<td><code>string</code></td>
<td>User-defined name that identifies an account within the organization. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$, example: TEST_NAME)</td>
<td>User-defined name that identifies an account within the organization. (pattern: <code>^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$</code>, example: TEST_NAME)</td>
</tr>
<tr>
<td><CopyableCode code="admin_name" /></td>
Expand Down Expand Up @@ -270,7 +270,7 @@ The following methods are available for this resource:
<tr>
<td><a href="#create_account"><CopyableCode code="create_account" /></a></td>
<td><CopyableCode code="insert" /></td>
<td><a href="#parameter-endpoint"><code>endpoint</code></a></td>
<td><a href="#parameter-endpoint"><code>endpoint</code></a>, <a href="#parameter-data__name"><code>data__name</code></a>, <a href="#parameter-data__admin_name"><code>data__admin_name</code></a>, <a href="#parameter-data__email"><code>data__email</code></a>, <a href="#parameter-data__edition"><code>data__edition</code></a></td>
<td></td>
<td>Creates a account. You must provide the full account definition when creating a account.</td>
</tr>
Expand Down Expand Up @@ -398,7 +398,8 @@ FROM snowflake.account.accounts
WHERE endpoint = '{{ endpoint }}' -- required
AND like = '{{ like }}'
AND showLimit = '{{ showLimit }}'
AND history = '{{ history }}';
AND history = '{{ history }}'
;
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -436,18 +437,18 @@ data__polaris,
endpoint
)
SELECT
'{{ name }}' --required,
'{{ name }}' /* required */,
'{{ region_group }}',
'{{ region }}',
'{{ edition }}' --required,
'{{ edition }}' /* required */,
'{{ comment }}',
'{{ admin_name }}' --required,
'{{ admin_name }}' /* required */,
'{{ admin_password }}',
'{{ admin_rsa_public_key }}',
'{{ admin_user_type }}',
'{{ first_name }}',
'{{ last_name }}',
'{{ email }}' --required,
'{{ email }}' /* required */,
{{ must_change_password }},
{{ polaris }},
'{{ endpoint }}'
Expand Down Expand Up @@ -558,7 +559,8 @@ DELETE FROM snowflake.account.accounts
WHERE name = '{{ name }}' --required
AND gracePeriodInDays = '{{ gracePeriodInDays }}' --required
AND endpoint = '{{ endpoint }}' --required
AND ifExists = '{{ ifExists }}';
AND ifExists = '{{ ifExists }}'
;
```
</TabItem>
</Tabs>
Expand All @@ -579,7 +581,8 @@ Restores a dropped account that has not yet been permanently deleted (a dropped
```sql
EXEC snowflake.account.accounts.undrop_account
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required;
@endpoint='{{ endpoint }}' --required
;
```
</TabItem>
</Tabs>
27 changes: 16 additions & 11 deletions website/docs/services/alert/alerts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ The following methods are available for this resource:
<tr>
<td><a href="#create_alert"><CopyableCode code="create_alert" /></a></td>
<td><CopyableCode code="insert" /></td>
<td><a href="#parameter-database_name"><code>database_name</code></a>, <a href="#parameter-schema_name"><code>schema_name</code></a>, <a href="#parameter-endpoint"><code>endpoint</code></a></td>
<td><a href="#parameter-database_name"><code>database_name</code></a>, <a href="#parameter-schema_name"><code>schema_name</code></a>, <a href="#parameter-endpoint"><code>endpoint</code></a>, <a href="#parameter-data__name"><code>data__name</code></a>, <a href="#parameter-data__schedule"><code>data__schedule</code></a>, <a href="#parameter-data__condition"><code>data__condition</code></a>, <a href="#parameter-data__action"><code>data__action</code></a></td>
<td><a href="#parameter-createMode"><code>createMode</code></a></td>
<td>Create an alert</td>
</tr>
Expand All @@ -238,7 +238,7 @@ The following methods are available for this resource:
<tr>
<td><a href="#clone_alert"><CopyableCode code="clone_alert" /></a></td>
<td><CopyableCode code="exec" /></td>
<td><a href="#parameter-database_name"><code>database_name</code></a>, <a href="#parameter-schema_name"><code>schema_name</code></a>, <a href="#parameter-name"><code>name</code></a>, <a href="#parameter-targetDatabase"><code>targetDatabase</code></a>, <a href="#parameter-targetSchema"><code>targetSchema</code></a>, <a href="#parameter-endpoint"><code>endpoint</code></a></td>
<td><a href="#parameter-database_name"><code>database_name</code></a>, <a href="#parameter-schema_name"><code>schema_name</code></a>, <a href="#parameter-name"><code>name</code></a>, <a href="#parameter-targetDatabase"><code>targetDatabase</code></a>, <a href="#parameter-targetSchema"><code>targetSchema</code></a>, <a href="#parameter-endpoint"><code>endpoint</code></a>, <a href="#parameter-name"><code>name</code></a></td>
<td><a href="#parameter-createMode"><code>createMode</code></a></td>
<td>Create a new alert by cloning from the specified resource</td>
</tr>
Expand Down Expand Up @@ -362,7 +362,8 @@ AND endpoint = '{{ endpoint }}' -- required
AND like = '{{ like }}'
AND startsWith = '{{ startsWith }}'
AND showLimit = '{{ showLimit }}'
AND fromName = '{{ fromName }}';
AND fromName = '{{ fromName }}'
;
```
</TabItem>
<TabItem value="fetch_alert">
Expand All @@ -387,7 +388,8 @@ FROM snowflake.alert.alerts
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required;
AND endpoint = '{{ endpoint }}' -- required
;
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -420,12 +422,12 @@ endpoint,
createMode
)
SELECT
'{{ name }}' --required,
'{{ name }}' /* required */,
'{{ comment }}',
'{{ schedule }}' --required,
'{{ schedule }}' /* required */,
'{{ warehouse }}',
'{{ condition }}' --required,
'{{ action }}' --required,
'{{ condition }}' /* required */,
'{{ action }}' /* required */,
'{{ database_name }}',
'{{ schema_name }}',
'{{ endpoint }}',
Expand Down Expand Up @@ -504,7 +506,8 @@ WHERE database_name = '{{ database_name }}' --required
AND schema_name = '{{ schema_name }}' --required
AND name = '{{ name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND ifExists = '{{ ifExists }}';
AND ifExists = '{{ ifExists }}'
;
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -536,7 +539,8 @@ EXEC snowflake.alert.alerts.clone_alert
'{
"name": "{{ name }}",
"point_of_time": "{{ point_of_time }}"
}';
}'
;
```
</TabItem>
<TabItem value="execute_alert">
Expand All @@ -548,7 +552,8 @@ EXEC snowflake.alert.alerts.execute_alert
@database_name='{{ database_name }}' --required,
@schema_name='{{ schema_name }}' --required,
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required;
@endpoint='{{ endpoint }}' --required
;
```
</TabItem>
</Tabs>
28 changes: 16 additions & 12 deletions website/docs/services/api_integration/api_integrations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ successful
<tr>
<td><CopyableCode code="name" /></td>
<td><code>string</code></td>
<td>Name of the API integration. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$)</td>
<td>Name of the API integration. (pattern: <code>^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$</code>)</td>
</tr>
<tr>
<td><CopyableCode code="api_allowed_prefixes" /></td>
Expand Down Expand Up @@ -105,7 +105,7 @@ successful
<tr>
<td><CopyableCode code="name" /></td>
<td><code>string</code></td>
<td>Name of the API integration. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$)</td>
<td>Name of the API integration. (pattern: <code>^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$</code>)</td>
</tr>
<tr>
<td><CopyableCode code="api_allowed_prefixes" /></td>
Expand Down Expand Up @@ -174,14 +174,14 @@ The following methods are available for this resource:
<tr>
<td><a href="#create_api_integration"><CopyableCode code="create_api_integration" /></a></td>
<td><CopyableCode code="insert" /></td>
<td><a href="#parameter-endpoint"><code>endpoint</code></a></td>
<td><a href="#parameter-endpoint"><code>endpoint</code></a>, <a href="#parameter-data__name"><code>data__name</code></a>, <a href="#parameter-data__api_hook"><code>data__api_hook</code></a>, <a href="#parameter-data__api_allowed_prefixes"><code>data__api_allowed_prefixes</code></a>, <a href="#parameter-data__enabled"><code>data__enabled</code></a></td>
<td><a href="#parameter-createMode"><code>createMode</code></a></td>
<td>Create an API integration</td>
</tr>
<tr>
<td><a href="#create_or_alter_api_integration"><CopyableCode code="create_or_alter_api_integration" /></a></td>
<td><CopyableCode code="replace" /></td>
<td><a href="#parameter-name"><code>name</code></a>, <a href="#parameter-endpoint"><code>endpoint</code></a></td>
<td><a href="#parameter-name"><code>name</code></a>, <a href="#parameter-endpoint"><code>endpoint</code></a>, <a href="#parameter-data__name"><code>data__name</code></a>, <a href="#parameter-data__api_hook"><code>data__api_hook</code></a>, <a href="#parameter-data__api_allowed_prefixes"><code>data__api_allowed_prefixes</code></a>, <a href="#parameter-data__enabled"><code>data__enabled</code></a></td>
<td></td>
<td>Create an (or alter an existing) API integration. Note that API_KEY is not currently altered by this operation and is supported for a newly-created object only. Unsetting API_BLOCKED_PREFIXES is also unsupported.</td>
</tr>
Expand Down Expand Up @@ -260,7 +260,8 @@ created_on,
enabled
FROM snowflake.api_integration.api_integrations
WHERE endpoint = '{{ endpoint }}' -- required
AND like = '{{ like }}';
AND like = '{{ like }}'
;
```
</TabItem>
<TabItem value="fetch_api_integration">
Expand All @@ -278,7 +279,8 @@ created_on,
enabled
FROM snowflake.api_integration.api_integrations
WHERE name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required;
AND endpoint = '{{ endpoint }}' -- required
;
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -309,11 +311,11 @@ endpoint,
createMode
)
SELECT
'{{ name }}' --required,
'{{ api_hook }}' --required,
'{{ api_allowed_prefixes }}' --required,
'{{ name }}' /* required */,
'{{ api_hook }}' /* required */,
'{{ api_allowed_prefixes }}' /* required */,
'{{ api_blocked_prefixes }}',
{{ enabled }} --required,
{{ enabled }} /* required */,
'{{ comment }}',
'{{ endpoint }}',
'{{ createMode }}'
Expand Down Expand Up @@ -391,7 +393,8 @@ AND endpoint = '{{ endpoint }}' --required
AND data__name = '{{ name }}' --required
AND data__api_hook = '{{ api_hook }}' --required
AND data__api_allowed_prefixes = '{{ api_allowed_prefixes }}' --required
AND data__enabled = {{ enabled }} --required;
AND data__enabled = {{ enabled }} --required
;
```
</TabItem>
</Tabs>
Expand All @@ -413,7 +416,8 @@ Delete an API integration
DELETE FROM snowflake.api_integration.api_integrations
WHERE name = '{{ name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND ifExists = '{{ ifExists }}';
AND ifExists = '{{ ifExists }}'
;
```
</TabItem>
</Tabs>
Loading
Loading