Skip to content

Commit 319921c

Browse files
authored
add docs on native apps (#65)
* add docs on native apps * make docs changes * Update index.md
1 parent 086b349 commit 319921c

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: "Native Apps"
3+
linkTitle: "Native Apps"
4+
weight: 18
5+
description: Get started with Native Apps in LocalStack for Snowflake
6+
---
7+
8+
## Introduction
9+
10+
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.
11+
12+
The Snowflake emulator supports creating & deploying Native Apps locally with the same statements as the Snowflake service. The following operations are supported:
13+
14+
- [`CREATE APPLICATIONS`](https://docs.snowflake.com/en/sql-reference/sql/create-application.html)
15+
- [`SHOW APPLICATION PACKAGES`](https://docs.snowflake.com/en/sql-reference/sql/show-application-packages.html)
16+
- [`ALTER APPLICATION PACKAGE`](https://docs.snowflake.com/en/sql-reference/sql/alter-application-package.html)
17+
- [`DESCRIBE APPLICATION`]( https://docs.snowflake.com/en/sql-reference/sql/desc-application)
18+
- [`DROP APPLICATION PACKAGE`](https://docs.snowflake.com/en/sql-reference/sql/drop-application-package.html)
19+
20+
## Getting started
21+
22+
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.
23+
24+
In this guide, you will locally deploy a Native App using an existing Application Package.
25+
26+
### Clone the repository
27+
28+
Clone the [Native Apps repository](https://github.com/localstack/native-apps) and navigate to the `examples/snowflake` directory:
29+
30+
```bash
31+
git clone https://github.com/snowflakedb/native-apps-examples.git
32+
cd native-apps-examples/tasks-streams
33+
```
34+
35+
### Deploy Native App
36+
37+
Deploy the Native App using the Snow CLI:
38+
39+
```bash
40+
snow app run --connection localstack
41+
```
42+
43+
The following output should be displayed:
44+
45+
```bash
46+
Creating new application package tasks_streams_app_pkg_username in account.
47+
Checking if stage tasks_streams_app_pkg_username.app_src.stage exists, or creating a new one if none exists.
48+
Performing a diff between the Snowflake stage: stage and your local deploy_root: /Users/username/code/localstack/native-apps-examples/tasks-streams/output/deploy.
49+
Local changes to be deployed:
50+
added: app/manifest.yml -> manifest.yml
51+
added: app/setup_script.sql -> setup_script.sql
52+
added: src/module-ui/src/environment.yml -> streamlit/environment.yml
53+
added: src/module-ui/src/ui.py -> streamlit/ui.py
54+
Updating the Snowflake stage from your local /Users/username/code/localstack/native-apps-examples/tasks-streams/output/deploy directory.
55+
Validating Snowflake Native App setup script.
56+
Creating new application object tasks_streams_app_username in account.
57+
Application 'TASKS_STREAMS_APP_username' created successfully.
58+
59+
Your application object (tasks_streams_app_username) is now available:
60+
https://app.snowflake.com/test/test/#/apps/application/TASKS_STREAMS_APP_username
61+
```
62+
63+
### Access Native App
64+
65+
You can access the Native App by visiting your preferred browser and navigating to the following URL:
66+
67+
```bash
68+
https://snowflake.localhost.localstack.cloud:4566/apps/test/test/TASKS_STREAMS_APP_username/
69+
```
70+
71+
{{< alert title="Note" >}}
72+
The URL above is an example. Change the outputted URL by:
73+
74+
1. Replacing `https://app.snowflake.com` with `https://snowflake.localhost.localstack.cloud:4566`.
75+
2. Changing the path structure from `/#/apps/application/` to `/apps/test/test/`.
76+
77+
You can make additional changes depending on your local setup.
78+
{{< /alert >}}
79+
80+
The following app should be displayed:
81+
82+
<img src="native-app.png" alt="Native App" width="900"/>
83+
<br><br>
Loading

0 commit comments

Comments
 (0)