@overscore/cli 0.13.10 → 0.13.11
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/dist/index.js
CHANGED
|
@@ -572,10 +572,32 @@ async function deploy() {
|
|
|
572
572
|
// Pull latest platform rules so the local project stays up to date
|
|
573
573
|
await syncPlatformRules(process.cwd(), baseUrl, apiKey);
|
|
574
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* Print the project's warehouse-connection status. A live connection (e.g.
|
|
577
|
+
* BigQuery) can exist with ZERO registered queries — so this is surfaced
|
|
578
|
+
* independently of the query list. Without it, an empty query list reads as
|
|
579
|
+
* "no warehouse here" even when one is wired and queryable via `query run`.
|
|
580
|
+
*/
|
|
581
|
+
function printConnection(connection) {
|
|
582
|
+
if (!connection)
|
|
583
|
+
return;
|
|
584
|
+
if (connection.connected) {
|
|
585
|
+
const label = connection.type === "bigquery" ? "BigQuery" : connection.type ?? "warehouse";
|
|
586
|
+
const where = connection.gcp_project_id ? ` — GCP project: ${connection.gcp_project_id}` : "";
|
|
587
|
+
console.log(` Data connection: ${label} connected${where}`);
|
|
588
|
+
console.log(` A live warehouse is wired up. Explore it with: npx @overscore/cli query run "<sql>"`);
|
|
589
|
+
console.log(` Then register the metrics you want: npx @overscore/cli query add <name> "<sql>"\n`);
|
|
590
|
+
}
|
|
591
|
+
else {
|
|
592
|
+
console.log(` Data connection: none (uploaded datasets only — no warehouse connected)\n`);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
575
595
|
async function queryList() {
|
|
576
596
|
const { dashboardSlug } = await loadEnv();
|
|
577
597
|
const data = (await apiRequest("GET", `/api/dashboards/${dashboardSlug}/queries`, undefined, "query-list"));
|
|
578
598
|
console.log(`\n Dashboard: ${data.dashboard}\n`);
|
|
599
|
+
// Warehouse connection status (independent of registered queries)
|
|
600
|
+
printConnection(data.connection);
|
|
579
601
|
// Registered queries
|
|
580
602
|
if (data.queries.length === 0) {
|
|
581
603
|
console.log(" No queries registered yet.\n");
|
package/package.json
CHANGED
|
@@ -24,6 +24,13 @@ Every meaningful exploration step in the log is a new entry: the question being
|
|
|
24
24
|
|
|
25
25
|
## How to run BigQuery queries
|
|
26
26
|
|
|
27
|
+
This project has a **live BigQuery connection** — the credentials live in the Hub and `query run` executes against your real warehouse. You don't need to "find" or "set up" a connection: if `query run` returns rows, the warehouse is wired and working. If you're unsure what's in it, discover the schema directly rather than assuming there's no data:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# list datasets/tables you can reach
|
|
31
|
+
npx @overscore/cli query run "SELECT table_schema, table_name FROM \`<gcp_project>\`.region-us.INFORMATION_SCHEMA.TABLES LIMIT 200"
|
|
32
|
+
```
|
|
33
|
+
|
|
27
34
|
Use the Overscore CLI to run SQL against the project's BigQuery connection:
|
|
28
35
|
|
|
29
36
|
```bash
|
|
@@ -33,7 +33,7 @@ Ask these one or two at a time conversationally — don't dump all 7 at once lik
|
|
|
33
33
|
|
|
34
34
|
## After the interview
|
|
35
35
|
|
|
36
|
-
1. **Read `.claude/knowledge/INDEX.md`** and any relevant knowledge files to understand what previous sessions have already documented about this project's data. Cross-reference what the user said against what's already known.
|
|
36
|
+
1. **Read `.claude/knowledge/INDEX.md`** and any relevant knowledge files to understand what previous sessions have already documented about this project's data. Cross-reference what the user said against what's already known. An empty knowledge base does NOT mean there's no data — this project has a **live BigQuery connection**. If neither the user nor the knowledge base names the tables, your first approved query can be an `INFORMATION_SCHEMA.TABLES` discovery pass (see CLAUDE.md); never conclude "there's no warehouse/no data" without actually querying it.
|
|
37
37
|
|
|
38
38
|
2. **Write `this-analysis.md` immediately** — before proposing a query plan. Fill in every section:
|
|
39
39
|
- **Question** — the clarified question, not the original title
|