-
Notifications
You must be signed in to change notification settings - Fork 0
add docs on native apps #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
title: "Native Apps" | ||
linkTitle: "Native Apps" | ||
weight: 18 | ||
description: Get started with Native Apps in LocalStack for Snowflake | ||
--- | ||
|
||
## Introduction | ||
|
||
Snowflake Native Apps are applications built and executed directly within the Snowflake Data Cloud platform. These apps can be used to extend the capabilities of Snowflake by integrating with external services, automating workflows, and building custom data applications. These apps are developed using Snowflake-native tools (e.g., Snowflake SQL, Snowflake API, and JavaScript) and can be distributed on the Snowflake Marketplace. | ||
|
||
The Snowflake emulator supports creating & deploying Native Apps locally with the same statements as the Snowflake service. The following operations are supported: | ||
|
||
- [`CREATE APPLICATIONS`](https://docs.snowflake.com/en/sql-reference/sql/create-application.html) | ||
- [`SHOW APPLICATION PACKAGES`](https://docs.snowflake.com/en/sql-reference/sql/show-application-packages.html) | ||
- [`ALTER APPLICATION PACKAGE`](https://docs.snowflake.com/en/sql-reference/sql/alter-application-package.html) | ||
- [`DESCRIBE APPLICATION PACKAGE`](https://docs.snowflake.com/en/sql-reference/sql/describe-application-package.html) | ||
- [`DROP APPLICATION PACKAGE`](https://docs.snowflake.com/en/sql-reference/sql/drop-application-package.html) | ||
|
||
## Getting started | ||
|
||
This guide is designed for users new to Native Apps and assumes basic knowledge of Snow CLI and Snowflake. Start your Snowflake emulator and connect to it using the Snow CLI in order to execute the commands further below. | ||
|
||
In this guide, you will locally deploy a Native App using an existing Application Package. | ||
|
||
### Clone the repository | ||
|
||
Clone the [Native Apps repository](https://github.com/localstack/native-apps) and navigate to the `examples/snowflake` directory: | ||
|
||
```bash | ||
git clone https://github.com/snowflakedb/native-apps-examples.git | ||
cd native-apps-examples/tasks-streams | ||
``` | ||
|
||
### Deploy Native App | ||
|
||
Deploy the Native App using the Snow CLI: | ||
|
||
```bash | ||
snow app run --connection localstack | ||
``` | ||
|
||
The following output should be displayed: | ||
|
||
```bash | ||
Creating new application package tasks_streams_app_pkg_username in account. | ||
Checking if stage tasks_streams_app_pkg_username.app_src.stage exists, or creating a new one if none exists. | ||
Performing a diff between the Snowflake stage: stage and your local deploy_root: /Users/username/code/localstack/native-apps-examples/tasks-streams/output/deploy. | ||
Local changes to be deployed: | ||
added: app/manifest.yml -> manifest.yml | ||
added: app/setup_script.sql -> setup_script.sql | ||
added: src/module-ui/src/environment.yml -> streamlit/environment.yml | ||
added: src/module-ui/src/ui.py -> streamlit/ui.py | ||
Updating the Snowflake stage from your local /Users/username/code/localstack/native-apps-examples/tasks-streams/output/deploy directory. | ||
Validating Snowflake Native App setup script. | ||
Creating new application object tasks_streams_app_username in account. | ||
Application 'TASKS_STREAMS_APP_username' created successfully. | ||
|
||
Your application object (tasks_streams_app_username) is now available: | ||
https://app.snowflake.com/test/test/#/apps/application/TASKS_STREAMS_APP_username | ||
``` | ||
|
||
### Access Native App | ||
|
||
You can access the Native App by visiting your preferred browser and navigating to the following URL: | ||
|
||
```bash | ||
https://snowflake.localhost.localstack.cloud:4566/apps/test/test/TASKS_STREAMS_APP_username/ | ||
``` | ||
|
||
{{< alert title="Note" >}} | ||
The URL above is an example. Change the outputted URL by: | ||
|
||
1. Replacing `https://app.snowflake.com` with `https://snowflake.localhost.localstack.cloud:4566`. | ||
2. Changing the path structure from `/#/apps/application/` to `/apps/test/test/`. | ||
|
||
You can make additional changes depending on your local setup. | ||
{{< /alert >}} | ||
|
||
The following app should be displayed: | ||
|
||
<img src="native-app.png" alt="Native App" width="900"/> | ||
<br><br> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.