giva-databricks 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- giva_databricks-0.1.0/LICENSE +21 -0
- giva_databricks-0.1.0/MANIFEST.in +10 -0
- giva_databricks-0.1.0/PKG-INFO +125 -0
- giva_databricks-0.1.0/README.md +110 -0
- giva_databricks-0.1.0/giva/__init__.py +61 -0
- giva_databricks-0.1.0/giva/app/admin_config.json +16 -0
- giva_databricks-0.1.0/giva/app/app.yaml +45 -0
- giva_databricks-0.1.0/giva/app/backend/__init__.py +0 -0
- giva_databricks-0.1.0/giva/app/backend/main.py +4735 -0
- giva_databricks-0.1.0/giva/app/backend/requirements.txt +7 -0
- giva_databricks-0.1.0/giva/app/backend/static/assets/index-D6MpWnWX.css +1 -0
- giva_databricks-0.1.0/giva/app/backend/static/assets/index-DGLl4N3w.js +451 -0
- giva_databricks-0.1.0/giva/app/backend/static/index.html +20 -0
- giva_databricks-0.1.0/giva/app/requirements.txt +9 -0
- giva_databricks-0.1.0/giva/conf/giva.json +130 -0
- giva_databricks-0.1.0/giva/dashboards/giva.lvdash.json +988 -0
- giva_databricks-0.1.0/giva/data/analytics/dim_users.parquet +0 -0
- giva_databricks-0.1.0/giva/data/analytics/fact_metal_prices.parquet +0 -0
- giva_databricks-0.1.0/giva/data/analytics/fact_nudges.parquet +0 -0
- giva_databricks-0.1.0/giva/data/analytics/fact_order_items.parquet +0 -0
- giva_databricks-0.1.0/giva/data/analytics/fact_orders.parquet +0 -0
- giva_databricks-0.1.0/giva/data/analytics/fact_wishlists.parquet +0 -0
- giva_databricks-0.1.0/giva/data/enriched_jewelry_products.parquet +0 -0
- giva_databricks-0.1.0/giva/data/jewelry_embeddings.parquet +0 -0
- giva_databricks-0.1.0/giva/data/jewelry_images.tar.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_chat_sessions.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_genie_history.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_metal_prices.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_nudge_emails.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_nudges.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_orders.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_product_prices.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_user_data_scd2.csv.gz +0 -0
- giva_databricks-0.1.0/giva/data/lakebase/brickjewels_users.csv.gz +0 -0
- giva_databricks-0.1.0/giva/genie/instructions.md +29 -0
- giva_databricks-0.1.0/giva/installer.py +640 -0
- giva_databricks-0.1.0/giva/jobs/metals_refresh.job.json +20 -0
- giva_databricks-0.1.0/giva/jobs/nudge_emails.job.json +21 -0
- giva_databricks-0.1.0/giva/notebooks/continuous_data_generator.py +372 -0
- giva_databricks-0.1.0/giva/notebooks/lakebase_cdc_ingestion.py +277 -0
- giva_databricks-0.1.0/giva/notebooks/refresh_metal_prices.py +288 -0
- giva_databricks-0.1.0/giva/notebooks/send_nudge_emails.py +337 -0
- giva_databricks-0.1.0/giva/sql/lakebase_schema.sql +147 -0
- giva_databricks-0.1.0/giva/sql/setup.sql +43 -0
- giva_databricks-0.1.0/giva_databricks.egg-info/PKG-INFO +125 -0
- giva_databricks-0.1.0/giva_databricks.egg-info/SOURCES.txt +49 -0
- giva_databricks-0.1.0/giva_databricks.egg-info/dependency_links.txt +1 -0
- giva_databricks-0.1.0/giva_databricks.egg-info/requires.txt +2 -0
- giva_databricks-0.1.0/giva_databricks.egg-info/top_level.txt +1 -0
- giva_databricks-0.1.0/pyproject.toml +45 -0
- giva_databricks-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anuj Lathi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
include README.md LICENSE
|
|
2
|
+
recursive-include giva/conf *.json
|
|
3
|
+
recursive-include giva/sql *.sql
|
|
4
|
+
recursive-include giva/genie *.md
|
|
5
|
+
recursive-include giva/dashboards *.json
|
|
6
|
+
recursive-include giva/jobs *.json
|
|
7
|
+
recursive-include giva/data *.parquet *.gz
|
|
8
|
+
recursive-include giva/notebooks *.py
|
|
9
|
+
recursive-include giva/app *.yaml *.txt *.json *.py
|
|
10
|
+
recursive-include giva/app/backend/static *
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: giva-databricks
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: One-line installer for the GIVA Databricks demo (AI jewelry commerce: data + Vector Search + Genie + AI/BI dashboard + Lakebase + FastAPI app + paused background jobs).
|
|
5
|
+
Author: Anuj Lathi
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/anuj1303/giva-databricks
|
|
8
|
+
Keywords: databricks,genie,ai-bi,vector-search,lakebase,apps,retail,demo,dbdemos
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: databricks-sdk>=0.33.0
|
|
13
|
+
Requires-Dist: psycopg2-binary>=2.9.9
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# š GIVA ā one-line Databricks demo installer
|
|
17
|
+
|
|
18
|
+
`giva` packages the entire **GIVA** AI jewelry-commerce demo into a
|
|
19
|
+
single `pip`-installable package, Ć la [dbdemos](https://www.dbdemos.ai/). One call
|
|
20
|
+
provisions the whole stack into your workspace from pre-baked real data.
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
%pip install giva-databricks
|
|
24
|
+
dbutils.library.restartPython()
|
|
25
|
+
|
|
26
|
+
import giva
|
|
27
|
+
giva.install('giva', catalog='my_catalog')
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Locally with a CLI profile:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install giva-databricks
|
|
34
|
+
python -c "import giva; giva.install('giva', profile='AnujLathi', catalog='anuj_vm_workspace_catalog')"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## What gets installed
|
|
38
|
+
|
|
39
|
+
| # | Asset | Detail |
|
|
40
|
+
|---|-------|--------|
|
|
41
|
+
| 1 | **UC data layer** | schema + volume, `enriched_jewelry_products` (~236 LLM-enriched products) + `jewelry_embeddings` + ~236 product images |
|
|
42
|
+
| 2 | **Vector Search** | `giva-vs` endpoint + `jewelry_embeddings_index` (DELTA_SYNC, 1024-dim) for semantic & image search |
|
|
43
|
+
| 3 | **Genie Space** | natural-language analytics over the product catalog |
|
|
44
|
+
| 4 | **AI/BI dashboard** | catalog & sales analytics, published |
|
|
45
|
+
| 5 | **Lakebase (Postgres)** | `giva-orders` instance + `giva` db: orders, users, nudges, live metal prices, dynamic product prices ā **seeded with data** |
|
|
46
|
+
| 6 | **App** | React + FastAPI storefront + admin analytics (Databricks App) |
|
|
47
|
+
| 7 | **Background jobs** | **Metals Refresh** + **Nudge Emails** ā created **PAUSED** (stopped, not triggered) |
|
|
48
|
+
|
|
49
|
+
### āø The two pipelines are installed PAUSED
|
|
50
|
+
|
|
51
|
+
Per design, the **Metals Refresh Pipeline** and **Nudge Emails Pipeline** jobs are
|
|
52
|
+
created with their schedule `pause_status = PAUSED`. They will **not** run on a
|
|
53
|
+
trigger. The demo works out of the box because metal prices and product prices are
|
|
54
|
+
**seeded** into Lakebase. When you want a live refresh, either:
|
|
55
|
+
|
|
56
|
+
- trigger them manually from the **admin app** (Run now), or
|
|
57
|
+
- unpause the schedule in the Jobs UI.
|
|
58
|
+
|
|
59
|
+
> The two job notebooks read Service-Principal credentials and (for emails) Gmail
|
|
60
|
+
> OAuth from a Databricks secret scope `giva`. These secrets are **not**
|
|
61
|
+
> created by the installer ā set them before unpausing if you want the jobs to run.
|
|
62
|
+
|
|
63
|
+
## Options
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
giva.install(
|
|
67
|
+
'giva',
|
|
68
|
+
catalog='my_catalog', # required on non-Free-Edition workspaces
|
|
69
|
+
schema='giva', # default
|
|
70
|
+
warehouse_id=None, # default: first running/available
|
|
71
|
+
install_app=True,
|
|
72
|
+
install_lakebase=True, # provision Lakebase + seed
|
|
73
|
+
install_jobs=True, # create the two PAUSED jobs
|
|
74
|
+
install_vector_search=True,
|
|
75
|
+
profile='AnujLathi', # only when running locally
|
|
76
|
+
)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Rebuilding the package data (maintainers)
|
|
80
|
+
|
|
81
|
+
The packaged `data/`, `dashboards/` and Lakebase schema are exported from the live
|
|
82
|
+
reference build. To refresh them:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
python scripts/export_live_assets.py --profile AnujLathi \
|
|
86
|
+
--catalog anuj_vm_workspace_catalog --schema caratlane_jewelry
|
|
87
|
+
python -m build # produces dist/giva-*.whl
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Installing the package
|
|
91
|
+
|
|
92
|
+
Until it's on PyPI, install the wheel straight from a GitHub Release:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pip install https://github.com/anuj1303/giva-demo/releases/download/v0.1.0/giva-0.1.0-py3-none-any.whl
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
or build-and-install from source:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pip install "git+https://github.com/anuj1303/giva-demo.git"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Publishing to PyPI (maintainers)
|
|
105
|
+
|
|
106
|
+
The `Publish giva-databricks to PyPI` GitHub Action publishes via **trusted publishing**
|
|
107
|
+
(OIDC ā no API tokens). One-time setup, then a one-click publish:
|
|
108
|
+
|
|
109
|
+
1. On https://pypi.org ā your account ā **Publishing** ā **Add a pending publisher**:
|
|
110
|
+
- PyPI Project Name: `giva`
|
|
111
|
+
- Owner: `anuj1303`
|
|
112
|
+
- Repository name: `giva-demo`
|
|
113
|
+
- Workflow name: `publish.yml`
|
|
114
|
+
- Environment: *(leave blank)*
|
|
115
|
+
2. In the repo: **Actions ā Publish giva-databricks to PyPI ā Run workflow**.
|
|
116
|
+
|
|
117
|
+
> Note: the wheel is ~88 MB (the 11.5M-row `nudge_emails` seed is most of it).
|
|
118
|
+
> That's under PyPI's 100 MB per-file limit but large ā the GitHub Release wheel
|
|
119
|
+
> above is the recommended distribution for most users.
|
|
120
|
+
|
|
121
|
+
## Reference build
|
|
122
|
+
|
|
123
|
+
- Workspace: AWS FE VM (`fe-vm-anuj-vm-workspace`)
|
|
124
|
+
- Source catalog/schema: `anuj_vm_workspace_catalog.caratlane_jewelry`
|
|
125
|
+
- App: `tanishq-jewelry-demo` (UI name **GIVA**)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# š GIVA ā one-line Databricks demo installer
|
|
2
|
+
|
|
3
|
+
`giva` packages the entire **GIVA** AI jewelry-commerce demo into a
|
|
4
|
+
single `pip`-installable package, Ć la [dbdemos](https://www.dbdemos.ai/). One call
|
|
5
|
+
provisions the whole stack into your workspace from pre-baked real data.
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
%pip install giva-databricks
|
|
9
|
+
dbutils.library.restartPython()
|
|
10
|
+
|
|
11
|
+
import giva
|
|
12
|
+
giva.install('giva', catalog='my_catalog')
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Locally with a CLI profile:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install giva-databricks
|
|
19
|
+
python -c "import giva; giva.install('giva', profile='AnujLathi', catalog='anuj_vm_workspace_catalog')"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What gets installed
|
|
23
|
+
|
|
24
|
+
| # | Asset | Detail |
|
|
25
|
+
|---|-------|--------|
|
|
26
|
+
| 1 | **UC data layer** | schema + volume, `enriched_jewelry_products` (~236 LLM-enriched products) + `jewelry_embeddings` + ~236 product images |
|
|
27
|
+
| 2 | **Vector Search** | `giva-vs` endpoint + `jewelry_embeddings_index` (DELTA_SYNC, 1024-dim) for semantic & image search |
|
|
28
|
+
| 3 | **Genie Space** | natural-language analytics over the product catalog |
|
|
29
|
+
| 4 | **AI/BI dashboard** | catalog & sales analytics, published |
|
|
30
|
+
| 5 | **Lakebase (Postgres)** | `giva-orders` instance + `giva` db: orders, users, nudges, live metal prices, dynamic product prices ā **seeded with data** |
|
|
31
|
+
| 6 | **App** | React + FastAPI storefront + admin analytics (Databricks App) |
|
|
32
|
+
| 7 | **Background jobs** | **Metals Refresh** + **Nudge Emails** ā created **PAUSED** (stopped, not triggered) |
|
|
33
|
+
|
|
34
|
+
### āø The two pipelines are installed PAUSED
|
|
35
|
+
|
|
36
|
+
Per design, the **Metals Refresh Pipeline** and **Nudge Emails Pipeline** jobs are
|
|
37
|
+
created with their schedule `pause_status = PAUSED`. They will **not** run on a
|
|
38
|
+
trigger. The demo works out of the box because metal prices and product prices are
|
|
39
|
+
**seeded** into Lakebase. When you want a live refresh, either:
|
|
40
|
+
|
|
41
|
+
- trigger them manually from the **admin app** (Run now), or
|
|
42
|
+
- unpause the schedule in the Jobs UI.
|
|
43
|
+
|
|
44
|
+
> The two job notebooks read Service-Principal credentials and (for emails) Gmail
|
|
45
|
+
> OAuth from a Databricks secret scope `giva`. These secrets are **not**
|
|
46
|
+
> created by the installer ā set them before unpausing if you want the jobs to run.
|
|
47
|
+
|
|
48
|
+
## Options
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
giva.install(
|
|
52
|
+
'giva',
|
|
53
|
+
catalog='my_catalog', # required on non-Free-Edition workspaces
|
|
54
|
+
schema='giva', # default
|
|
55
|
+
warehouse_id=None, # default: first running/available
|
|
56
|
+
install_app=True,
|
|
57
|
+
install_lakebase=True, # provision Lakebase + seed
|
|
58
|
+
install_jobs=True, # create the two PAUSED jobs
|
|
59
|
+
install_vector_search=True,
|
|
60
|
+
profile='AnujLathi', # only when running locally
|
|
61
|
+
)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Rebuilding the package data (maintainers)
|
|
65
|
+
|
|
66
|
+
The packaged `data/`, `dashboards/` and Lakebase schema are exported from the live
|
|
67
|
+
reference build. To refresh them:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
python scripts/export_live_assets.py --profile AnujLathi \
|
|
71
|
+
--catalog anuj_vm_workspace_catalog --schema caratlane_jewelry
|
|
72
|
+
python -m build # produces dist/giva-*.whl
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Installing the package
|
|
76
|
+
|
|
77
|
+
Until it's on PyPI, install the wheel straight from a GitHub Release:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install https://github.com/anuj1303/giva-demo/releases/download/v0.1.0/giva-0.1.0-py3-none-any.whl
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
or build-and-install from source:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install "git+https://github.com/anuj1303/giva-demo.git"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Publishing to PyPI (maintainers)
|
|
90
|
+
|
|
91
|
+
The `Publish giva-databricks to PyPI` GitHub Action publishes via **trusted publishing**
|
|
92
|
+
(OIDC ā no API tokens). One-time setup, then a one-click publish:
|
|
93
|
+
|
|
94
|
+
1. On https://pypi.org ā your account ā **Publishing** ā **Add a pending publisher**:
|
|
95
|
+
- PyPI Project Name: `giva`
|
|
96
|
+
- Owner: `anuj1303`
|
|
97
|
+
- Repository name: `giva-demo`
|
|
98
|
+
- Workflow name: `publish.yml`
|
|
99
|
+
- Environment: *(leave blank)*
|
|
100
|
+
2. In the repo: **Actions ā Publish giva-databricks to PyPI ā Run workflow**.
|
|
101
|
+
|
|
102
|
+
> Note: the wheel is ~88 MB (the 11.5M-row `nudge_emails` seed is most of it).
|
|
103
|
+
> That's under PyPI's 100 MB per-file limit but large ā the GitHub Release wheel
|
|
104
|
+
> above is the recommended distribution for most users.
|
|
105
|
+
|
|
106
|
+
## Reference build
|
|
107
|
+
|
|
108
|
+
- Workspace: AWS FE VM (`fe-vm-anuj-vm-workspace`)
|
|
109
|
+
- Source catalog/schema: `anuj_vm_workspace_catalog.caratlane_jewelry`
|
|
110
|
+
- App: `tanishq-jewelry-demo` (UI name **GIVA**)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
giva ā one-line installer for the GIVA Databricks demo.
|
|
3
|
+
|
|
4
|
+
GIVA is an end-to-end AI jewelry-commerce demo. One call provisions:
|
|
5
|
+
|
|
6
|
+
1. Unity Catalog data layer (catalog/schema/volume, ~236 enriched products + images)
|
|
7
|
+
2. Vector Search index (semantic + image search, 1024-dim)
|
|
8
|
+
3. Genie Space (NL -> SQL over the product catalog)
|
|
9
|
+
4. AI/BI dashboard (sales / catalog analytics, published)
|
|
10
|
+
5. Lakebase (Postgres) (orders, users, nudges, live metal prices, dynamic product prices) + seed data
|
|
11
|
+
6. FastAPI + React app (storefront + admin analytics)
|
|
12
|
+
7. Two background jobs (Metals Refresh + Nudge Emails) ā installed PAUSED (stopped, not triggered)
|
|
13
|
+
|
|
14
|
+
Usage (inside a Databricks notebook):
|
|
15
|
+
|
|
16
|
+
%pip install giva-databricks
|
|
17
|
+
dbutils.library.restartPython()
|
|
18
|
+
|
|
19
|
+
import giva
|
|
20
|
+
giva.help()
|
|
21
|
+
giva.install('giva', catalog='my_catalog')
|
|
22
|
+
|
|
23
|
+
Locally (with a Databricks CLI profile):
|
|
24
|
+
|
|
25
|
+
giva.install('giva', profile='DEFAULT', catalog='main')
|
|
26
|
+
"""
|
|
27
|
+
import json
|
|
28
|
+
from importlib import resources
|
|
29
|
+
|
|
30
|
+
from .installer import install, Installer # noqa: F401
|
|
31
|
+
|
|
32
|
+
__version__ = "0.1.0"
|
|
33
|
+
__all__ = ["install", "list_demos", "help", "Installer", "__version__"]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def list_demos():
|
|
37
|
+
"""Print the demos bundled in this package."""
|
|
38
|
+
conf_dir = resources.files("giva").joinpath("conf")
|
|
39
|
+
print("\nš Available GIVA demos:\n")
|
|
40
|
+
for entry in conf_dir.iterdir():
|
|
41
|
+
if entry.name.endswith(".json"):
|
|
42
|
+
c = json.loads(entry.read_text(encoding="utf-8"))
|
|
43
|
+
print(f" ⢠{c['name']:<14} {c['title']}")
|
|
44
|
+
print(f" {c['description'][:120]}ā¦\n")
|
|
45
|
+
print("Install with: giva.install('giva', catalog='<your_catalog>')\n")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def help():
|
|
49
|
+
"""Print quick-start help."""
|
|
50
|
+
print(__doc__)
|
|
51
|
+
print("Options for install():")
|
|
52
|
+
print(" demo demo name (default 'giva')")
|
|
53
|
+
print(" catalog target UC catalog (default 'main')")
|
|
54
|
+
print(" schema target UC schema (default 'giva')")
|
|
55
|
+
print(" warehouse_id SQL warehouse to use (default: first running/available)")
|
|
56
|
+
print(" install_app also deploy the FastAPI app (default True)")
|
|
57
|
+
print(" install_lakebase provision Lakebase + seed data (default True)")
|
|
58
|
+
print(" install_jobs create the two PAUSED background jobs (default True)")
|
|
59
|
+
print(" profile Databricks CLI profile (only needed when running locally)")
|
|
60
|
+
print(" overwrite reinstall over existing assets (default False)\n")
|
|
61
|
+
print("Note: the Metals Refresh and Nudge Emails jobs are always created PAUSED.\n")
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
command: ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
2
|
+
|
|
3
|
+
env:
|
|
4
|
+
# --- data layer (provisioned by the installer) ---
|
|
5
|
+
- name: GIVA_CATALOG
|
|
6
|
+
value: "{{CATALOG}}"
|
|
7
|
+
- name: GIVA_SCHEMA
|
|
8
|
+
value: "{{SCHEMA}}"
|
|
9
|
+
- name: GIVA_PRODUCTS_TABLE
|
|
10
|
+
value: "{{CATALOG}}.{{SCHEMA}}.enriched_jewelry_products"
|
|
11
|
+
- name: GIVA_VS_ENDPOINT
|
|
12
|
+
value: "{{VS_ENDPOINT}}"
|
|
13
|
+
- name: GIVA_VS_INDEX
|
|
14
|
+
value: "{{CATALOG}}.{{SCHEMA}}.jewelry_embeddings_index"
|
|
15
|
+
- name: GIVA_IMAGE_VOLUME
|
|
16
|
+
value: "/Volumes/{{CATALOG}}/{{SCHEMA}}/{{VOLUME}}"
|
|
17
|
+
# --- warehouse ---
|
|
18
|
+
- name: DATABRICKS_WAREHOUSE_ID
|
|
19
|
+
valueFrom: "sql-warehouse"
|
|
20
|
+
# --- Lakebase (orders / users / nudges / prices) ---
|
|
21
|
+
- name: LAKEBASE_HOST
|
|
22
|
+
value: "{{LAKEBASE_HOST}}"
|
|
23
|
+
- name: LAKEBASE_DB
|
|
24
|
+
value: "{{LAKEBASE_DATABASE}}"
|
|
25
|
+
# --- embedded analytics ---
|
|
26
|
+
- name: LAKEVIEW_DASHBOARD_ID
|
|
27
|
+
value: "{{DASHBOARD_ID}}"
|
|
28
|
+
- name: GENIE_SPACE_ID
|
|
29
|
+
value: "{{GENIE_SPACE_ID}}"
|
|
30
|
+
# --- background jobs (created PAUSED by the installer) ---
|
|
31
|
+
- name: PRICE_REFRESH_JOB_ID
|
|
32
|
+
value: "{{PRICE_REFRESH_JOB_ID}}"
|
|
33
|
+
- name: NUDGE_EMAIL_JOB_ID
|
|
34
|
+
value: "{{NUDGE_EMAIL_JOB_ID}}"
|
|
35
|
+
|
|
36
|
+
resources:
|
|
37
|
+
- name: sql-warehouse
|
|
38
|
+
sql_warehouse:
|
|
39
|
+
id: "{{WAREHOUSE_ID}}"
|
|
40
|
+
permission: "CAN_USE"
|
|
41
|
+
- name: giva-orders-db
|
|
42
|
+
database:
|
|
43
|
+
instance_name: "{{LAKEBASE_INSTANCE}}"
|
|
44
|
+
database_name: "{{LAKEBASE_DATABASE}}"
|
|
45
|
+
permission: "CAN_CONNECT_AND_CREATE"
|
|
File without changes
|