Skip to content

Commit 4ad6a23

Browse files
docs: genericize getting started and fix apache license (#24)
* docs: genericize getting started and fix apache license * fix: require explicit source config selection
1 parent 4f831df commit 4ad6a23

5 files changed

Lines changed: 52 additions & 22 deletions

File tree

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resolver = "2"
99

1010
[workspace.package]
1111
edition = "2021"
12-
license = "MIT"
12+
license = "Apache-2.0"
1313
publish = false
1414
version = "0.0.3"
1515

README.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,33 @@ Recurring Convex export pipelines for local analytics, Databricks, and downstrea
44

55
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/shpitdev/convex-sync-kit)
66
[![Release](https://img.shields.io/github/v/release/shpitdev/convex-sync-kit?display_name=tag)](https://github.com/shpitdev/convex-sync-kit/releases)
7-
[![License: MIT](https://img.shields.io/badge/license-MIT-2ea44f)](LICENSE)
7+
[![License: Apache-2.0](https://img.shields.io/github/license/shpitdev/convex-sync-kit)](LICENSE)
88

99
![Rust](https://img.shields.io/badge/Rust-000000?logo=rust&logoColor=white)
1010
![Convex](https://img.shields.io/badge/Convex-EE342F?logo=convex&logoColor=white)
1111
![Amazon S3](https://img.shields.io/badge/Amazon%20S3-569A31?logo=amazons3&logoColor=white)
1212
![Databricks](https://img.shields.io/badge/Databricks-FF3621?logo=databricks&logoColor=white)
1313
![Palantir Foundry](https://img.shields.io/badge/Palantir%20Foundry-virtual%20tables-101828)
1414

15+
## Required Inputs
16+
17+
These are the minimum inputs almost everyone needs before a recurring sync will work:
18+
19+
```bash
20+
export CONVEX_DEPLOYMENT_URL=https://your-deployment.convex.cloud
21+
export CONVEX_DEPLOY_KEY=your-convex-deploy-key
22+
```
23+
24+
Target-specific requirements:
25+
26+
| Target | Also required |
27+
|---|---|
28+
| Local recurring analysis | writable output paths |
29+
| S3/export | AWS credentials, `--bucket`, optional `--prefix` |
30+
| Databricks Delta | Databricks profile plus a SQL warehouse ID for bootstrap |
31+
| Databricks over S3 | Databricks profile, SQL warehouse ID, and Unity Catalog external-location coverage |
32+
| Palantir Foundry | either Databricks/Unity Catalog or an S3 path to connect Foundry to |
33+
1534
## Choose Your Path
1635

1736
```mermaid
@@ -34,6 +53,8 @@ flowchart TD
3453

3554
If you only need a one-time export or ad hoc backfill, use the official Convex tooling directly. This repo is aimed at recurring pipelines, not the simplest possible one-shot export.
3655

56+
See:
57+
3758
- [Convex streaming import/export](https://docs.convex.dev/production/integrations/streaming-import-export)
3859
- [Convex streaming export API](https://docs.convex.dev/streaming-export-api)
3960

@@ -68,21 +89,29 @@ There are two supported Databricks paths:
6889
Recommended Databricks Delta flow:
6990

7091
```bash
71-
export CONVEX_SYNC_SOURCE=meshix-api
92+
export CONVEX_SYNC_SOURCE=<source-slug>
7293

73-
just databricks-delta-bootstrap 63d28889f3eb3c4b
94+
just databricks-delta-bootstrap <warehouse-id>
7495
just databricks-delta-sync-secret DEFAULT
7596
just databricks-delta-deploy DEFAULT prod
7697
just databricks-delta-run DEFAULT prod
7798
```
7899

100+
The Delta path creates and updates:
101+
102+
- `convex_sync_kit_<source>_delta_control`
103+
- `convex_sync_kit_<source>_delta_bronze`
104+
- `convex_sync_kit_<source>_delta_silver`
105+
106+
The silver schema is expected to stay empty until you stand up a Lakeflow `AUTO CDC` pipeline for the tables you actually want to materialize there.
107+
79108
Reference Databricks over S3 flow:
80109

81110
```bash
82-
export CONVEX_SYNC_SOURCE=meshix-api
111+
export CONVEX_SYNC_SOURCE=<source-slug>
83112

84-
just run --bucket your-bucket --prefix prod
85-
just databricks-sync-staging-views --warehouse-id 63d28889f3eb3c4b --bucket your-bucket --prefix prod
113+
just run --bucket <bucket> --prefix prod
114+
just databricks-sync-staging-views --warehouse-id <warehouse-id> --bucket <bucket> --prefix prod
86115
```
87116

88117
### 4. Using Palantir Foundry
@@ -118,7 +147,7 @@ Relevant Foundry docs:
118147
| Databricks over S3 | Unity Catalog views over published parquet snapshots | `convex_sync_kit_<source>_s3` |
119148
| Databricks Delta | checkpoint table, bronze CDC tables, silver current-state tables | `convex_sync_kit_<source>_delta_{control,bronze,silver}` |
120149

121-
The current checked-in source profile is [`sources/meshix-api/env.sh`](sources/meshix-api/env.sh). That is only one source profile, not a repo identity. Add more source directories as you onboard more Convex projects.
150+
The checked-in [`sources/meshix-api/env.sh`](sources/meshix-api/env.sh) file is only an example source profile, not a repo identity. Add more source directories as you onboard more Convex projects.
122151

123152
## Output Paths And Defaults
124153

@@ -191,4 +220,4 @@ There is a more detailed capture list in [docs/demo-storyboard.md](docs/demo-sto
191220

192221
## License
193222

194-
[MIT](LICENSE)
223+
[Apache License 2.0](LICENSE)

scripts/load-source-config.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ set -euo pipefail
33

44
load_convex_sync_source_config() {
55
local repo_root="$1"
6-
local source_name="${CONVEX_SYNC_SOURCE:-meshix-api}"
6+
local source_name="${CONVEX_SYNC_SOURCE:-}"
7+
8+
if [[ -z "$source_name" ]]; then
9+
return 0
10+
fi
711
local source_file="$repo_root/sources/$source_name/env.sh"
812

913
if [[ ! -f "$source_file" ]]; then
10-
if [[ -n "${CONVEX_SYNC_SOURCE:-}" ]]; then
11-
echo "unknown Convex source config: $source_name" >&2
12-
return 1
13-
fi
14-
return 0
14+
echo "unknown Convex source config: $source_name" >&2
15+
return 1
1516
fi
1617

1718
# shellcheck source=/dev/null

sources/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ Recommended contents:
2222
- `DATABRICKS_DELTA_SILVER_SCHEMA`
2323
- `DATABRICKS_DELTA_CHECKPOINT_TABLE`
2424

25-
Scripts load `sources/${CONVEX_SYNC_SOURCE:-meshix-api}/env.sh` automatically.
26-
Explicit environment variables still win because the source files only set
27-
defaults.
25+
Scripts load `sources/$CONVEX_SYNC_SOURCE/env.sh` automatically when
26+
`CONVEX_SYNC_SOURCE` is set. Explicit environment variables still win because
27+
the source files only set defaults.

0 commit comments

Comments
 (0)