create-dql-app 1.6.13 → 1.6.14
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.
- package/README.md +20 -5
- package/bin/create-dql-app.mjs +7 -0
- package/package.json +1 -1
- package/templates/starter/README.md +17 -5
- package/templates/starter/apps/.gitkeep +1 -0
- package/templates/starter/blocks/.gitkeep +1 -0
- package/templates/starter/business-views/.gitkeep +1 -0
- package/templates/starter/package.json +1 -1
- package/templates/starter/semantic-layer/.gitkeep +1 -0
- package/templates/starter/terms/.gitkeep +1 -0
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@ The fastest way to start a DQL project.
|
|
|
6
6
|
npx create-dql-app@latest my-analytics
|
|
7
7
|
cd my-analytics
|
|
8
8
|
npm install
|
|
9
|
+
npm install --prefix .dql/connectors duckdb # DuckDB/local files only
|
|
10
|
+
# npm install --prefix .dql/connectors snowflake-sdk # Snowflake only
|
|
11
|
+
# Databricks does not need an extra package.
|
|
9
12
|
npm run notebook
|
|
10
13
|
```
|
|
11
14
|
|
|
@@ -13,16 +16,28 @@ Opens a running notebook at <http://127.0.0.1:3474> in under 5 minutes on a
|
|
|
13
16
|
clean machine. No global install required; the template installs
|
|
14
17
|
`@duckcodeailabs/dql-cli` locally and exposes it through npm scripts.
|
|
15
18
|
|
|
16
|
-
The scaffolded project is a clean starter: `dql.config.json
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
The scaffolded project is a clean starter: `dql.config.json`, a welcome
|
|
20
|
+
notebook, and npm scripts for `notebook`, `compile`, `lineage`, `doctor`, and
|
|
21
|
+
`validate`. If a sibling dbt project is detected, it is wired into
|
|
22
|
+
`dql.config.json` automatically so `dql sync dbt` works out of the box.
|
|
23
|
+
|
|
24
|
+
Database drivers are project-local so the base install stays fast:
|
|
25
|
+
|
|
26
|
+
| Database | Extra install | Notes |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| Databricks SQL | none | Built into DQL through HTTPS |
|
|
29
|
+
| DuckDB or local files | `npm install --prefix .dql/connectors duckdb` | Needed for DuckDB, CSV, Parquet, and JSON |
|
|
30
|
+
| Snowflake | `npm install --prefix .dql/connectors snowflake-sdk` | Needed for Snowflake connections |
|
|
31
|
+
|
|
32
|
+
You can also install DuckDB or Snowflake from the notebook Connections page.
|
|
21
33
|
|
|
22
34
|
Want a ready-made dbt project to try DQL on? Clone the example repo and add
|
|
23
35
|
DQL to it — the same steps you'd use on your own dbt repo:
|
|
24
36
|
[github.com/duckcode-ai/jaffle-shop-duckdb](https://github.com/duckcode-ai/jaffle-shop-duckdb).
|
|
25
37
|
|
|
38
|
+
Already installed `@duckcodeailabs/dql-cli` globally? That only installs the
|
|
39
|
+
command. From an existing dbt repo, run `dql init ./dql` before `cd dql`.
|
|
40
|
+
|
|
26
41
|
## Flags
|
|
27
42
|
|
|
28
43
|
| Flag | Default | Meaning |
|
package/bin/create-dql-app.mjs
CHANGED
|
@@ -167,6 +167,12 @@ async function main() {
|
|
|
167
167
|
const pm = detectPackageManager();
|
|
168
168
|
const installCmd = pm === 'npm' ? 'npm install' : `${pm} install`;
|
|
169
169
|
const runCmd = pm === 'npm' ? 'npm run notebook' : `${pm} notebook`;
|
|
170
|
+
const connectorTip = [
|
|
171
|
+
c.dim('# Optional database driver install before running queries:'),
|
|
172
|
+
c.dim('# DuckDB/local files: npm install --prefix .dql/connectors duckdb'),
|
|
173
|
+
c.dim('# Snowflake: npm install --prefix .dql/connectors snowflake-sdk'),
|
|
174
|
+
c.dim('# Databricks: no extra package'),
|
|
175
|
+
].join('\n ');
|
|
170
176
|
const dbtTip = dbtSibling
|
|
171
177
|
? `\n\n${c.dim('Tip:')} run ${c.bold('dbt parse')} inside ${c.dim(dbtSibling)}\n first, then ${c.bold(pm === 'npm' ? 'npm run sync' : `${pm} sync`)} to import the dbt DAG.`
|
|
172
178
|
: '';
|
|
@@ -176,6 +182,7 @@ ${c.green('✓ Ready.')} Next steps:
|
|
|
176
182
|
|
|
177
183
|
${c.bold(`cd ${args.dir}`)}
|
|
178
184
|
${c.bold(installCmd)}
|
|
185
|
+
${connectorTip}
|
|
179
186
|
${c.bold(runCmd)}${dbtTip}
|
|
180
187
|
|
|
181
188
|
Your notebook will open at ${c.cyan('http://127.0.0.1:3474')}.
|
package/package.json
CHANGED
|
@@ -17,17 +17,29 @@ connects technical lineage with business lineage.
|
|
|
17
17
|
|
|
18
18
|
## Connect your warehouse
|
|
19
19
|
|
|
20
|
-
Edit `dql.config.json`
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`read_csv_auto('./file.csv')`.
|
|
20
|
+
Edit `dql.config.json` or open the notebook connection panel. DQL uses a flat
|
|
21
|
+
install by default: Databricks SQL works through the built-in HTTP connector,
|
|
22
|
+
and DuckDB or Snowflake drivers can be installed project-locally when needed.
|
|
23
|
+
Add your warehouse connection in the notebook or config.
|
|
25
24
|
|
|
26
25
|
```bash
|
|
27
26
|
npm install
|
|
28
27
|
npm run doctor
|
|
29
28
|
```
|
|
30
29
|
|
|
30
|
+
Choose one database path before running queries:
|
|
31
|
+
|
|
32
|
+
| Database | Extra install | Notes |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| Databricks SQL | none | Built into DQL through HTTPS |
|
|
35
|
+
| DuckDB or local CSV/Parquet/JSON files | `npm install --prefix .dql/connectors duckdb` | Needed for `duckdb` and `file` connections |
|
|
36
|
+
| Snowflake | `npm install --prefix .dql/connectors snowflake-sdk` | Needed for Snowflake connections |
|
|
37
|
+
|
|
38
|
+
The notebook Connections page can also install DuckDB or Snowflake into
|
|
39
|
+
`.dql/connectors/`. For local files, add a DuckDB/file connection and query CSV
|
|
40
|
+
or Parquet data with functions such as `read_csv_auto('./file.csv')`.
|
|
41
|
+
See the [connector reference](https://github.com/duckcode-ai/dql/blob/main/docs/reference/connectors.md).
|
|
42
|
+
|
|
31
43
|
## Start the notebook
|
|
32
44
|
|
|
33
45
|
```bash
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|