yamchart 0.9.2 → 0.9.3
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/{advisor-SK2EPAAY.js → advisor-SC64RTZO.js} +11 -11
- package/dist/agent-TZZHNDPK.js +8 -0
- package/dist/{chunk-4P5UHWYK.js → chunk-7CD6UQAV.js} +102 -2
- package/dist/chunk-7CD6UQAV.js.map +1 -0
- package/dist/chunk-7D4SUZUM.js +38 -0
- package/dist/{chunk-EHM6AMMA.js → chunk-EAQXUGP6.js} +65 -2
- package/dist/chunk-EAQXUGP6.js.map +1 -0
- package/dist/{chunk-UDKODFOE.js → chunk-H4L3FNLS.js} +16 -6
- package/dist/chunk-H4L3FNLS.js.map +1 -0
- package/dist/{chunk-OI3EGXVE.js → chunk-NXQ6ZO3V.js} +19 -4
- package/dist/chunk-NXQ6ZO3V.js.map +1 -0
- package/dist/{chunk-65G5DBRO.js → chunk-RM6MNDVF.js} +35 -5
- package/dist/chunk-RM6MNDVF.js.map +1 -0
- package/dist/{chunk-EHYYYKRW.js → chunk-RMIDEBHD.js} +4 -4
- package/dist/{chunk-CWAWATL4.js → chunk-S7YQXEKM.js} +159 -2
- package/dist/chunk-S7YQXEKM.js.map +1 -0
- package/dist/{chunk-ZA6AOQVZ.js → chunk-ZMJPRNOA.js} +2 -2
- package/dist/{compare-ZN6RUOOQ.js → compare-RQFCEZIK.js} +2 -2
- package/dist/{connection-utils-MCJBJEDQ.js → connection-utils-C4FQGBW6.js} +5 -5
- package/dist/{describe-XJ5GXYUE.js → describe-X75C2VDU.js} +7 -7
- package/dist/{dev-PLBVJXT4.js → dev-KDNXUNME.js} +27978 -13314
- package/dist/dev-KDNXUNME.js.map +1 -0
- package/dist/{dist-VNX77VV5.js → dist-JMLAZUL7.js} +9 -3
- package/dist/{dist-7CRX2GIR.js → dist-MNXSMGV6.js} +3 -3
- package/dist/{dist-OCECEAXB.js → dist-MX5K2ABB.js} +3 -3
- package/dist/{dist-JH7OL7U4.js → dist-NGQG7Z4G.js} +7 -3
- package/dist/{generate-KNER36CB.js → generate-B7FAWVIQ.js} +2 -2
- package/dist/index.js +33 -33
- package/dist/{init-GVBYCLJT.js → init-SECXKD5G.js} +2 -2
- package/dist/{lineage-T5NRHHZN.js → lineage-HYO4RKZT.js} +2 -2
- package/dist/{query-2RB75CRI.js → query-QNRDS74I.js} +5 -5
- package/dist/{reset-password-IZQTDTU7.js → reset-password-HDCLH7PZ.js} +3 -3
- package/dist/{rewrite-database-FDJIXKZ2.js → rewrite-database-BOA4QPUR.js} +2 -2
- package/dist/{sample-3UAL7MVU.js → sample-SKLHBZBU.js} +5 -5
- package/dist/{search-ODC4S575.js → search-4KMETZVX.js} +7 -7
- package/dist/{semantic-RAP3S5PQ.js → semantic-6WKELH5V.js} +2 -2
- package/dist/source-resolver-R7WBIL7M.js +18 -0
- package/dist/{sync-dbt-22QQKT3A.js → sync-dbt-72GVO75P.js} +2 -2
- package/dist/{sync-warehouse-QMCT5B4G.js → sync-warehouse-UWRNUXE7.js} +41 -15
- package/dist/sync-warehouse-UWRNUXE7.js.map +1 -0
- package/dist/{tables-QWHUCBRH.js → tables-V65QUGHK.js} +7 -7
- package/dist/templates/default/docs/yamchart-reference.md +74 -9
- package/dist/{test-KX2GETNF.js → test-UE5OWG3E.js} +5 -5
- package/dist/{update-WMATDZTO.js → update-HWCJNQRP.js} +2 -2
- package/package.json +10 -4
- package/dist/agent-KWKPAYT2.js +0 -8
- package/dist/chunk-4P5UHWYK.js.map +0 -1
- package/dist/chunk-65G5DBRO.js.map +0 -1
- package/dist/chunk-CWAWATL4.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-EHM6AMMA.js.map +0 -1
- package/dist/chunk-OI3EGXVE.js.map +0 -1
- package/dist/chunk-UDKODFOE.js.map +0 -1
- package/dist/dev-PLBVJXT4.js.map +0 -1
- package/dist/source-resolver-6QBBNW3P.js +0 -18
- package/dist/sync-warehouse-QMCT5B4G.js.map +0 -1
- /package/dist/{advisor-SK2EPAAY.js.map → advisor-SC64RTZO.js.map} +0 -0
- /package/dist/{agent-KWKPAYT2.js.map → agent-TZZHNDPK.js.map} +0 -0
- /package/dist/{chunk-DGUM43GV.js.map → chunk-7D4SUZUM.js.map} +0 -0
- /package/dist/{chunk-EHYYYKRW.js.map → chunk-RMIDEBHD.js.map} +0 -0
- /package/dist/{chunk-ZA6AOQVZ.js.map → chunk-ZMJPRNOA.js.map} +0 -0
- /package/dist/{compare-ZN6RUOOQ.js.map → compare-RQFCEZIK.js.map} +0 -0
- /package/dist/{connection-utils-MCJBJEDQ.js.map → connection-utils-C4FQGBW6.js.map} +0 -0
- /package/dist/{describe-XJ5GXYUE.js.map → describe-X75C2VDU.js.map} +0 -0
- /package/dist/{dist-JH7OL7U4.js.map → dist-JMLAZUL7.js.map} +0 -0
- /package/dist/{dist-7CRX2GIR.js.map → dist-MNXSMGV6.js.map} +0 -0
- /package/dist/{dist-OCECEAXB.js.map → dist-MX5K2ABB.js.map} +0 -0
- /package/dist/{dist-VNX77VV5.js.map → dist-NGQG7Z4G.js.map} +0 -0
- /package/dist/{generate-KNER36CB.js.map → generate-B7FAWVIQ.js.map} +0 -0
- /package/dist/{init-GVBYCLJT.js.map → init-SECXKD5G.js.map} +0 -0
- /package/dist/{lineage-T5NRHHZN.js.map → lineage-HYO4RKZT.js.map} +0 -0
- /package/dist/{query-2RB75CRI.js.map → query-QNRDS74I.js.map} +0 -0
- /package/dist/{reset-password-IZQTDTU7.js.map → reset-password-HDCLH7PZ.js.map} +0 -0
- /package/dist/{rewrite-database-FDJIXKZ2.js.map → rewrite-database-BOA4QPUR.js.map} +0 -0
- /package/dist/{sample-3UAL7MVU.js.map → sample-SKLHBZBU.js.map} +0 -0
- /package/dist/{search-ODC4S575.js.map → search-4KMETZVX.js.map} +0 -0
- /package/dist/{semantic-RAP3S5PQ.js.map → semantic-6WKELH5V.js.map} +0 -0
- /package/dist/{source-resolver-6QBBNW3P.js.map → source-resolver-R7WBIL7M.js.map} +0 -0
- /package/dist/{sync-dbt-22QQKT3A.js.map → sync-dbt-72GVO75P.js.map} +0 -0
- /package/dist/{tables-QWHUCBRH.js.map → tables-V65QUGHK.js.map} +0 -0
- /package/dist/{test-KX2GETNF.js.map → test-UE5OWG3E.js.map} +0 -0
- /package/dist/{update-WMATDZTO.js.map → update-HWCJNQRP.js.map} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BigQueryConnector,
|
|
2
3
|
DATE_PRESETS,
|
|
3
4
|
DuckDBConnector,
|
|
4
5
|
MySQLConnector,
|
|
@@ -9,6 +10,7 @@ import {
|
|
|
9
10
|
SnowflakeConnector,
|
|
10
11
|
SqlList,
|
|
11
12
|
VERSION,
|
|
13
|
+
bigQueryTypeToString,
|
|
12
14
|
checkSchema,
|
|
13
15
|
computePreviousPeriod,
|
|
14
16
|
createTemplateContext,
|
|
@@ -23,6 +25,7 @@ import {
|
|
|
23
25
|
isRelativeDateRange,
|
|
24
26
|
parseModelMetadata,
|
|
25
27
|
renderTemplate,
|
|
28
|
+
resolveBigQueryAuth,
|
|
26
29
|
resolveDynamicDefault,
|
|
27
30
|
resolveMySQLAuth,
|
|
28
31
|
resolvePostgresAuth,
|
|
@@ -32,7 +35,7 @@ import {
|
|
|
32
35
|
runModel,
|
|
33
36
|
serializeDateValue,
|
|
34
37
|
templateHasVariable
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-S7YQXEKM.js";
|
|
36
39
|
import {
|
|
37
40
|
SemanticModelBuilder,
|
|
38
41
|
SemanticQueryCompiler,
|
|
@@ -42,8 +45,9 @@ import {
|
|
|
42
45
|
inferAggregationType,
|
|
43
46
|
validateSemanticQuery
|
|
44
47
|
} from "./chunk-UND73EOB.js";
|
|
45
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-7D4SUZUM.js";
|
|
46
49
|
export {
|
|
50
|
+
BigQueryConnector,
|
|
47
51
|
DATE_PRESETS,
|
|
48
52
|
DuckDBConnector,
|
|
49
53
|
MySQLConnector,
|
|
@@ -57,6 +61,7 @@ export {
|
|
|
57
61
|
SnowflakeConnector,
|
|
58
62
|
SqlList,
|
|
59
63
|
VERSION,
|
|
64
|
+
bigQueryTypeToString,
|
|
60
65
|
checkSchema,
|
|
61
66
|
classifyCatalogColumns,
|
|
62
67
|
classifyField,
|
|
@@ -74,6 +79,7 @@ export {
|
|
|
74
79
|
isRelativeDateRange,
|
|
75
80
|
parseModelMetadata,
|
|
76
81
|
renderTemplate,
|
|
82
|
+
resolveBigQueryAuth,
|
|
77
83
|
resolveDynamicDefault,
|
|
78
84
|
resolveMySQLAuth,
|
|
79
85
|
resolvePostgresAuth,
|
|
@@ -85,4 +91,4 @@ export {
|
|
|
85
91
|
templateHasVariable,
|
|
86
92
|
validateSemanticQuery
|
|
87
93
|
};
|
|
88
|
-
//# sourceMappingURL=dist-
|
|
94
|
+
//# sourceMappingURL=dist-JMLAZUL7.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-S7YQXEKM.js";
|
|
2
2
|
import {
|
|
3
3
|
SemanticModelBuilder,
|
|
4
4
|
SemanticQueryCompiler
|
|
5
5
|
} from "./chunk-UND73EOB.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-7D4SUZUM.js";
|
|
7
7
|
|
|
8
8
|
// ../../packages/advisor/dist/dbt/knowledge.js
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
@@ -787,4 +787,4 @@ export {
|
|
|
787
787
|
updateSchemaYml,
|
|
788
788
|
writeDbtModel
|
|
789
789
|
};
|
|
790
|
-
//# sourceMappingURL=dist-
|
|
790
|
+
//# sourceMappingURL=dist-MNXSMGV6.js.map
|
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
VERSION,
|
|
25
25
|
deepMerge,
|
|
26
26
|
resolveProjectConfig
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-RM6MNDVF.js";
|
|
28
|
+
import "./chunk-7D4SUZUM.js";
|
|
29
29
|
export {
|
|
30
30
|
AgentDefinitionSchema,
|
|
31
31
|
ChartSchema,
|
|
@@ -53,4 +53,4 @@ export {
|
|
|
53
53
|
deepMerge,
|
|
54
54
|
resolveProjectConfig
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=dist-
|
|
56
|
+
//# sourceMappingURL=dist-MX5K2ABB.js.map
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthDatabase,
|
|
3
|
+
generateOpaqueToken,
|
|
3
4
|
generateSessionToken,
|
|
4
5
|
hashPassword,
|
|
6
|
+
hashToken,
|
|
5
7
|
parseTtl,
|
|
6
8
|
verifyPassword
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-7CD6UQAV.js";
|
|
10
|
+
import "./chunk-7D4SUZUM.js";
|
|
9
11
|
export {
|
|
10
12
|
AuthDatabase,
|
|
13
|
+
generateOpaqueToken,
|
|
11
14
|
generateSessionToken,
|
|
12
15
|
hashPassword,
|
|
16
|
+
hashToken,
|
|
13
17
|
parseTtl,
|
|
14
18
|
verifyPassword
|
|
15
19
|
};
|
|
16
|
-
//# sourceMappingURL=dist-
|
|
20
|
+
//# sourceMappingURL=dist-NGQG7Z4G.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-7D4SUZUM.js";
|
|
2
2
|
|
|
3
3
|
// src/commands/generate.ts
|
|
4
4
|
import { readFile } from "fs/promises";
|
|
@@ -314,4 +314,4 @@ async function generate(projectDir, options) {
|
|
|
314
314
|
export {
|
|
315
315
|
generate
|
|
316
316
|
};
|
|
317
|
-
//# sourceMappingURL=generate-
|
|
317
|
+
//# sourceMappingURL=generate-B7FAWVIQ.js.map
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
findProjectRoot,
|
|
7
7
|
loadEnvFile,
|
|
8
8
|
validateProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RMIDEBHD.js";
|
|
10
10
|
import {
|
|
11
11
|
detail,
|
|
12
12
|
error,
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
success,
|
|
18
18
|
warning
|
|
19
19
|
} from "./chunk-HJVVHYVN.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-RM6MNDVF.js";
|
|
21
|
+
import "./chunk-S7YQXEKM.js";
|
|
22
22
|
import "./chunk-UND73EOB.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-7D4SUZUM.js";
|
|
24
24
|
|
|
25
25
|
// src/index.ts
|
|
26
26
|
import { Command } from "commander";
|
|
@@ -105,7 +105,7 @@ program.command("dev").description("Start development server with hot reload").a
|
|
|
105
105
|
process.exit(2);
|
|
106
106
|
}
|
|
107
107
|
const globalOpts = program.opts();
|
|
108
|
-
const { runDevServer } = await import("./dev-
|
|
108
|
+
const { runDevServer } = await import("./dev-KDNXUNME.js");
|
|
109
109
|
await runDevServer(projectDir, {
|
|
110
110
|
port: parseInt(options.port, 10),
|
|
111
111
|
apiOnly: options.apiOnly ?? false,
|
|
@@ -115,7 +115,7 @@ program.command("dev").description("Start development server with hot reload").a
|
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
program.command("init").description("Create a new yamchart project").argument("[directory]", "Target directory", ".").option("--example", "Create full example project with sample database").option("--empty", "Create only yamchart.yaml (no connections, models, or charts)").option("--force", "Overwrite existing files").action(async (directory, options) => {
|
|
118
|
-
const { initProject } = await import("./init-
|
|
118
|
+
const { initProject } = await import("./init-SECXKD5G.js");
|
|
119
119
|
const targetDir = resolve(directory);
|
|
120
120
|
const result = await initProject(targetDir, options);
|
|
121
121
|
if (!result.success) {
|
|
@@ -134,7 +134,7 @@ program.command("init").description("Create a new yamchart project").argument("[
|
|
|
134
134
|
info(`Run \`cd ${directory === "." ? basename(targetDir) : directory} && yamchart dev\` to start.`);
|
|
135
135
|
});
|
|
136
136
|
program.command("sync-dbt").description("Sync dbt project metadata into AI-readable catalog").option("-s, --source <type>", "Source type: local, github, dbt-cloud", "local").option("-p, --path <dir>", "Path to dbt project (for local source)").option("--repo <repo>", "GitHub repository (for github source)").option("--branch <branch>", "Git branch (for github source)", "main").option("-i, --include <patterns...>", "Include glob patterns").option("-e, --exclude <patterns...>", "Exclude glob patterns").option("-t, --tag <tags...>", "Filter by dbt tags").option("--refresh", "Re-sync using saved configuration").option("--target-database <database>", "Override database in ref() paths (e.g. switch from dev to prod)").action(async (options) => {
|
|
137
|
-
const { syncDbt, loadSyncConfig } = await import("./sync-dbt-
|
|
137
|
+
const { syncDbt, loadSyncConfig } = await import("./sync-dbt-72GVO75P.js");
|
|
138
138
|
const projectDir = await findProjectRoot(process.cwd());
|
|
139
139
|
if (!projectDir) {
|
|
140
140
|
error("yamchart.yaml not found");
|
|
@@ -179,8 +179,8 @@ program.command("sync-dbt").description("Sync dbt project metadata into AI-reada
|
|
|
179
179
|
if (!options.targetDatabase) {
|
|
180
180
|
try {
|
|
181
181
|
const { readFile } = await import("fs/promises");
|
|
182
|
-
const { resolveConnection } = await import("./connection-utils-
|
|
183
|
-
const { detectDatabaseMismatch } = await import("./rewrite-database-
|
|
182
|
+
const { resolveConnection } = await import("./connection-utils-C4FQGBW6.js");
|
|
183
|
+
const { detectDatabaseMismatch } = await import("./rewrite-database-BOA4QPUR.js");
|
|
184
184
|
const catalogJsonStr = await readFile(join(projectDir, ".yamchart", "catalog.json"), "utf-8");
|
|
185
185
|
const catalogData = JSON.parse(catalogJsonStr);
|
|
186
186
|
const connection = await resolveConnection(projectDir, void 0, program.opts().env);
|
|
@@ -199,7 +199,7 @@ program.command("sync-dbt").description("Sync dbt project metadata into AI-reada
|
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
201
|
program.command("generate").description("Generate SQL model stubs from dbt catalog").argument("[model]", "Specific model to generate (optional)").option("--yolo", "Skip all prompts, use defaults for everything").action(async (model, options) => {
|
|
202
|
-
const { generate } = await import("./generate-
|
|
202
|
+
const { generate } = await import("./generate-B7FAWVIQ.js");
|
|
203
203
|
const projectDir = await findProjectRoot(process.cwd());
|
|
204
204
|
if (!projectDir) {
|
|
205
205
|
error("yamchart.yaml not found");
|
|
@@ -233,7 +233,7 @@ program.command("test").description("Run model tests (@returns schema checks and
|
|
|
233
233
|
}
|
|
234
234
|
loadEnvFile(projectDir);
|
|
235
235
|
try {
|
|
236
|
-
const { testProject, formatTestOutput } = await import("./test-
|
|
236
|
+
const { testProject, formatTestOutput } = await import("./test-UE5OWG3E.js");
|
|
237
237
|
const result = await testProject(projectDir, model, {
|
|
238
238
|
connection: options.connection,
|
|
239
239
|
json: options.json
|
|
@@ -256,7 +256,7 @@ program.command("test").description("Run model tests (@returns schema checks and
|
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
258
|
program.command("update").description("Check for yamchart updates").action(async () => {
|
|
259
|
-
const { runUpdate } = await import("./update-
|
|
259
|
+
const { runUpdate } = await import("./update-HWCJNQRP.js");
|
|
260
260
|
await runUpdate(pkg.version);
|
|
261
261
|
});
|
|
262
262
|
program.command("reset-password").description("Reset a user password (requires auth to be enabled)").requiredOption("-e, --email <email>", "Email address of the user").action(async (options) => {
|
|
@@ -268,7 +268,7 @@ program.command("reset-password").description("Reset a user password (requires a
|
|
|
268
268
|
process.exit(2);
|
|
269
269
|
}
|
|
270
270
|
loadEnvFile(projectDir);
|
|
271
|
-
const { resetPassword } = await import("./reset-password-
|
|
271
|
+
const { resetPassword } = await import("./reset-password-HDCLH7PZ.js");
|
|
272
272
|
await resetPassword(projectDir, options.email);
|
|
273
273
|
});
|
|
274
274
|
program.command("tables").description("List tables and views in the connected database").option("-c, --connection <name>", "Connection to use (overrides default)").option("-s, --schema <name>", "Filter to schema").option("-d, --database <name>", "Filter to database (Snowflake/Databricks)").option("--json", "Output as JSON").option("--source <type>", "Data source: auto, catalog, model, or db (default: auto)").option("--compare", "Compare local metadata against live database").action(async (options) => {
|
|
@@ -282,8 +282,8 @@ program.command("tables").description("List tables and views in the connected da
|
|
|
282
282
|
loadEnvFile(projectDir);
|
|
283
283
|
try {
|
|
284
284
|
if (options.compare) {
|
|
285
|
-
const { resolveTablesSource } = await import("./source-resolver-
|
|
286
|
-
const { compareTables, formatCompareTables } = await import("./compare-
|
|
285
|
+
const { resolveTablesSource } = await import("./source-resolver-R7WBIL7M.js");
|
|
286
|
+
const { compareTables, formatCompareTables } = await import("./compare-RQFCEZIK.js");
|
|
287
287
|
let localResult;
|
|
288
288
|
try {
|
|
289
289
|
localResult = await resolveTablesSource(projectDir, "catalog", options.connection, {
|
|
@@ -313,7 +313,7 @@ program.command("tables").description("List tables and views in the connected da
|
|
|
313
313
|
}
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
|
-
const { listTables } = await import("./tables-
|
|
316
|
+
const { listTables } = await import("./tables-V65QUGHK.js");
|
|
317
317
|
const result = await listTables(projectDir, {
|
|
318
318
|
...options,
|
|
319
319
|
source: options.source || "auto"
|
|
@@ -351,8 +351,8 @@ program.command("describe").description("Show columns and types for a table").ar
|
|
|
351
351
|
loadEnvFile(projectDir);
|
|
352
352
|
try {
|
|
353
353
|
if (options.compare) {
|
|
354
|
-
const { resolveDescribeSource } = await import("./source-resolver-
|
|
355
|
-
const { compareColumns, formatCompareColumns } = await import("./compare-
|
|
354
|
+
const { resolveDescribeSource } = await import("./source-resolver-R7WBIL7M.js");
|
|
355
|
+
const { compareColumns, formatCompareColumns } = await import("./compare-RQFCEZIK.js");
|
|
356
356
|
let localResult;
|
|
357
357
|
try {
|
|
358
358
|
localResult = await resolveDescribeSource(projectDir, table, "catalog", options.connection);
|
|
@@ -373,7 +373,7 @@ program.command("describe").description("Show columns and types for a table").ar
|
|
|
373
373
|
}
|
|
374
374
|
return;
|
|
375
375
|
}
|
|
376
|
-
const { describeTable } = await import("./describe-
|
|
376
|
+
const { describeTable } = await import("./describe-X75C2VDU.js");
|
|
377
377
|
const result = await describeTable(projectDir, table, {
|
|
378
378
|
...options,
|
|
379
379
|
source: options.source || "auto"
|
|
@@ -412,8 +412,8 @@ program.command("query").description("Execute SQL against a connection").argumen
|
|
|
412
412
|
}
|
|
413
413
|
loadEnvFile(projectDir);
|
|
414
414
|
try {
|
|
415
|
-
const { executeQuery } = await import("./query-
|
|
416
|
-
const { formatTable, formatJSON } = await import("./connection-utils-
|
|
415
|
+
const { executeQuery } = await import("./query-QNRDS74I.js");
|
|
416
|
+
const { formatTable, formatJSON } = await import("./connection-utils-C4FQGBW6.js");
|
|
417
417
|
const limit = options.limit ? parseInt(options.limit, 10) : void 0;
|
|
418
418
|
const result = await executeQuery(projectDir, sql, {
|
|
419
419
|
connection: options.connection,
|
|
@@ -440,8 +440,8 @@ program.command("sample").description("Show sample rows from a table or dbt mode
|
|
|
440
440
|
}
|
|
441
441
|
loadEnvFile(projectDir);
|
|
442
442
|
try {
|
|
443
|
-
const { sampleTable } = await import("./sample-
|
|
444
|
-
const { formatTable, formatJSON } = await import("./connection-utils-
|
|
443
|
+
const { sampleTable } = await import("./sample-SKLHBZBU.js");
|
|
444
|
+
const { formatTable, formatJSON } = await import("./connection-utils-C4FQGBW6.js");
|
|
445
445
|
const limit = options.limit ? parseInt(options.limit, 10) : void 0;
|
|
446
446
|
const result = await sampleTable(projectDir, table, {
|
|
447
447
|
connection: options.connection,
|
|
@@ -471,7 +471,7 @@ program.command("search").description("Search for tables and columns by keyword"
|
|
|
471
471
|
}
|
|
472
472
|
loadEnvFile(projectDir);
|
|
473
473
|
try {
|
|
474
|
-
const { searchDatabase } = await import("./search-
|
|
474
|
+
const { searchDatabase } = await import("./search-4KMETZVX.js");
|
|
475
475
|
const result = await searchDatabase(projectDir, keyword, {
|
|
476
476
|
...options,
|
|
477
477
|
source: options.source || "auto"
|
|
@@ -525,7 +525,7 @@ catalogCmd.command("tables").description("List tables from cached catalog").opti
|
|
|
525
525
|
process.exit(2);
|
|
526
526
|
}
|
|
527
527
|
try {
|
|
528
|
-
const { listTables } = await import("./tables-
|
|
528
|
+
const { listTables } = await import("./tables-V65QUGHK.js");
|
|
529
529
|
const result = await listTables(projectDir, {
|
|
530
530
|
source: "catalog",
|
|
531
531
|
schema: options.schema
|
|
@@ -567,7 +567,7 @@ catalogCmd.command("describe").description("Show cached columns and types for a
|
|
|
567
567
|
process.exit(2);
|
|
568
568
|
}
|
|
569
569
|
try {
|
|
570
|
-
const { describeTable } = await import("./describe-
|
|
570
|
+
const { describeTable } = await import("./describe-X75C2VDU.js");
|
|
571
571
|
const result = await describeTable(projectDir, table, { source: "catalog" });
|
|
572
572
|
if (options.json) {
|
|
573
573
|
console.log(JSON.stringify(result.columns, null, 2));
|
|
@@ -609,7 +609,7 @@ catalogCmd.command("search").description("Search cached metadata for tables and
|
|
|
609
609
|
process.exit(2);
|
|
610
610
|
}
|
|
611
611
|
try {
|
|
612
|
-
const { searchDatabase } = await import("./search-
|
|
612
|
+
const { searchDatabase } = await import("./search-4KMETZVX.js");
|
|
613
613
|
const result = await searchDatabase(projectDir, keyword, { source: "catalog" });
|
|
614
614
|
if (options.json) {
|
|
615
615
|
console.log(JSON.stringify(result.results, null, 2));
|
|
@@ -734,7 +734,7 @@ program.command("sync-warehouse").description("Sync warehouse table metadata int
|
|
|
734
734
|
}
|
|
735
735
|
loadEnvFile(projectDir);
|
|
736
736
|
try {
|
|
737
|
-
const { runSyncWarehouse } = await import("./sync-warehouse-
|
|
737
|
+
const { runSyncWarehouse } = await import("./sync-warehouse-UWRNUXE7.js");
|
|
738
738
|
await runSyncWarehouse(projectDir, options);
|
|
739
739
|
} catch (err) {
|
|
740
740
|
error(err instanceof Error ? err.message : String(err));
|
|
@@ -751,7 +751,7 @@ program.command("lineage").description("Show upstream dependencies for a model")
|
|
|
751
751
|
}
|
|
752
752
|
loadEnvFile(projectDir);
|
|
753
753
|
try {
|
|
754
|
-
const { getLineage } = await import("./lineage-
|
|
754
|
+
const { getLineage } = await import("./lineage-HYO4RKZT.js");
|
|
755
755
|
const depth = options.depth ? parseInt(options.depth, 10) : void 0;
|
|
756
756
|
const result = await getLineage(projectDir, model, {
|
|
757
757
|
depth,
|
|
@@ -785,7 +785,7 @@ program.command("advisor").description("AI-powered dbt model advisor \u2014 sugg
|
|
|
785
785
|
process.exit(2);
|
|
786
786
|
}
|
|
787
787
|
loadEnvFile(projectDir);
|
|
788
|
-
const { runAdvisor } = await import("./advisor-
|
|
788
|
+
const { runAdvisor } = await import("./advisor-SC64RTZO.js");
|
|
789
789
|
await runAdvisor(projectDir, question, {
|
|
790
790
|
top: options.top ? parseInt(options.top, 10) : 5,
|
|
791
791
|
json: options.json,
|
|
@@ -806,7 +806,7 @@ var semanticCmd = program.command("semantic").description("Explore the semantic
|
|
|
806
806
|
const { readFile } = await import("fs/promises");
|
|
807
807
|
const catalogPath = join(projectDir, ".yamchart", "catalog.json");
|
|
808
808
|
const catalogJson = JSON.parse(await readFile(catalogPath, "utf-8"));
|
|
809
|
-
const { listSemanticEntities } = await import("./semantic-
|
|
809
|
+
const { listSemanticEntities } = await import("./semantic-6WKELH5V.js");
|
|
810
810
|
const result = listSemanticEntities(catalogJson);
|
|
811
811
|
if (options.json) {
|
|
812
812
|
console.log(JSON.stringify(result.entities, null, 2));
|
|
@@ -853,7 +853,7 @@ semanticCmd.command("query").description("Run a structured query against the sem
|
|
|
853
853
|
const { readFile } = await import("fs/promises");
|
|
854
854
|
const catalogPath = join(projectDir, ".yamchart", "catalog.json");
|
|
855
855
|
const catalogJson = JSON.parse(await readFile(catalogPath, "utf-8"));
|
|
856
|
-
const { querySemanticEntity } = await import("./semantic-
|
|
856
|
+
const { querySemanticEntity } = await import("./semantic-6WKELH5V.js");
|
|
857
857
|
const filters = (options.filter || []).map((f) => {
|
|
858
858
|
const eqIdx = f.indexOf("=");
|
|
859
859
|
if (eqIdx === -1) throw new Error(`Invalid filter format: "${f}". Use dimension=value`);
|
|
@@ -875,7 +875,7 @@ semanticCmd.command("query").description("Run a structured query against the sem
|
|
|
875
875
|
console.log(result.sql);
|
|
876
876
|
return;
|
|
877
877
|
}
|
|
878
|
-
const { resolveConnection, createConnector, formatTable, formatJSON } = await import("./connection-utils-
|
|
878
|
+
const { resolveConnection, createConnector, formatTable, formatJSON } = await import("./connection-utils-C4FQGBW6.js");
|
|
879
879
|
const connection = await resolveConnection(projectDir, options.connection, program.opts().env);
|
|
880
880
|
const connector = createConnector(connection, projectDir);
|
|
881
881
|
const start = performance.now();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-7D4SUZUM.js";
|
|
2
2
|
|
|
3
3
|
// src/commands/init.ts
|
|
4
4
|
import { mkdir, readFile, writeFile, access, readdir, copyFile } from "fs/promises";
|
|
@@ -131,4 +131,4 @@ async function copyDirectory(srcDir, destDir, files, projectName, basePath = "")
|
|
|
131
131
|
export {
|
|
132
132
|
initProject
|
|
133
133
|
};
|
|
134
|
-
//# sourceMappingURL=init-
|
|
134
|
+
//# sourceMappingURL=init-SECXKD5G.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-7D4SUZUM.js";
|
|
2
2
|
|
|
3
3
|
// src/commands/lineage.ts
|
|
4
4
|
import { readFile, readdir, access } from "fs/promises";
|
|
@@ -208,4 +208,4 @@ export {
|
|
|
208
208
|
renderLineageTree,
|
|
209
209
|
resolveDependencies
|
|
210
210
|
};
|
|
211
|
-
//# sourceMappingURL=lineage-
|
|
211
|
+
//# sourceMappingURL=lineage-HYO4RKZT.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createConnector,
|
|
3
3
|
resolveConnection
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NXQ6ZO3V.js";
|
|
5
|
+
import "./chunk-RM6MNDVF.js";
|
|
6
|
+
import "./chunk-S7YQXEKM.js";
|
|
7
7
|
import "./chunk-UND73EOB.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7D4SUZUM.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/query.ts
|
|
11
11
|
var LIMIT_REGEX = /\bLIMIT\s+\d+\s*$/i;
|
|
@@ -30,4 +30,4 @@ async function executeQuery(projectDir, sql, options) {
|
|
|
30
30
|
export {
|
|
31
31
|
executeQuery
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=query-
|
|
33
|
+
//# sourceMappingURL=query-QNRDS74I.js.map
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
newline,
|
|
6
6
|
success
|
|
7
7
|
} from "./chunk-HJVVHYVN.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7D4SUZUM.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/reset-password.ts
|
|
11
11
|
import { resolve } from "path";
|
|
12
12
|
import { homedir } from "os";
|
|
13
13
|
import { randomBytes } from "crypto";
|
|
14
14
|
async function resetPassword(projectDir, email) {
|
|
15
|
-
const { AuthDatabase, hashPassword } = await import("./dist-
|
|
15
|
+
const { AuthDatabase, hashPassword } = await import("./dist-NGQG7Z4G.js");
|
|
16
16
|
const { readFileSync } = await import("fs");
|
|
17
17
|
const { parse } = await import("yaml");
|
|
18
18
|
const projectPath = resolve(projectDir, "yamchart.yaml");
|
|
@@ -57,4 +57,4 @@ async function resetPassword(projectDir, email) {
|
|
|
57
57
|
export {
|
|
58
58
|
resetPassword
|
|
59
59
|
};
|
|
60
|
-
//# sourceMappingURL=reset-password-
|
|
60
|
+
//# sourceMappingURL=reset-password-HDCLH7PZ.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
extractDatabase,
|
|
4
4
|
rewriteTableDatabase
|
|
5
5
|
} from "./chunk-IVD4OP3K.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-7D4SUZUM.js";
|
|
7
7
|
export {
|
|
8
8
|
detectDatabaseMismatch,
|
|
9
9
|
extractDatabase,
|
|
10
10
|
rewriteTableDatabase
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=rewrite-database-
|
|
12
|
+
//# sourceMappingURL=rewrite-database-BOA4QPUR.js.map
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createConnector,
|
|
6
6
|
resolveConnection
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-NXQ6ZO3V.js";
|
|
8
|
+
import "./chunk-RM6MNDVF.js";
|
|
9
|
+
import "./chunk-S7YQXEKM.js";
|
|
10
10
|
import "./chunk-UND73EOB.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-7D4SUZUM.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/sample.ts
|
|
14
14
|
import { performance } from "perf_hooks";
|
|
@@ -38,4 +38,4 @@ async function sampleTable(projectDir, table, options) {
|
|
|
38
38
|
export {
|
|
39
39
|
sampleTable
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=sample-
|
|
41
|
+
//# sourceMappingURL=sample-SKLHBZBU.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSearchSource
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H4L3FNLS.js";
|
|
4
4
|
import "./chunk-VJC24RKT.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-EAQXUGP6.js";
|
|
6
|
+
import "./chunk-NXQ6ZO3V.js";
|
|
7
|
+
import "./chunk-RM6MNDVF.js";
|
|
8
|
+
import "./chunk-S7YQXEKM.js";
|
|
9
9
|
import "./chunk-UND73EOB.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-7D4SUZUM.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/search.ts
|
|
13
13
|
async function searchDatabase(projectDir, keyword, options) {
|
|
@@ -25,4 +25,4 @@ async function searchDatabase(projectDir, keyword, options) {
|
|
|
25
25
|
export {
|
|
26
26
|
searchDatabase
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=search-
|
|
28
|
+
//# sourceMappingURL=search-4KMETZVX.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
SemanticModelBuilder,
|
|
3
3
|
SemanticQueryCompiler
|
|
4
4
|
} from "./chunk-UND73EOB.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-7D4SUZUM.js";
|
|
6
6
|
|
|
7
7
|
// src/commands/semantic.ts
|
|
8
8
|
function listSemanticEntities(catalog) {
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
listSemanticEntities,
|
|
37
37
|
querySemanticEntity
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=semantic-
|
|
39
|
+
//# sourceMappingURL=semantic-6WKELH5V.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveDescribeSource,
|
|
3
|
+
resolveSearchSource,
|
|
4
|
+
resolveTablesSource
|
|
5
|
+
} from "./chunk-H4L3FNLS.js";
|
|
6
|
+
import "./chunk-VJC24RKT.js";
|
|
7
|
+
import "./chunk-EAQXUGP6.js";
|
|
8
|
+
import "./chunk-NXQ6ZO3V.js";
|
|
9
|
+
import "./chunk-RM6MNDVF.js";
|
|
10
|
+
import "./chunk-S7YQXEKM.js";
|
|
11
|
+
import "./chunk-UND73EOB.js";
|
|
12
|
+
import "./chunk-7D4SUZUM.js";
|
|
13
|
+
export {
|
|
14
|
+
resolveDescribeSource,
|
|
15
|
+
resolveSearchSource,
|
|
16
|
+
resolveTablesSource
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=source-resolver-R7WBIL7M.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
rewriteTableDatabase
|
|
7
7
|
} from "./chunk-IVD4OP3K.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7D4SUZUM.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/sync-dbt.ts
|
|
11
11
|
import { mkdir, writeFile, readFile as readFile3, access as access3 } from "fs/promises";
|
|
@@ -569,4 +569,4 @@ export {
|
|
|
569
569
|
loadSyncConfig,
|
|
570
570
|
syncDbt
|
|
571
571
|
};
|
|
572
|
-
//# sourceMappingURL=sync-dbt-
|
|
572
|
+
//# sourceMappingURL=sync-dbt-72GVO75P.js.map
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getColumnsQuery,
|
|
8
8
|
getDescribeQuery,
|
|
9
9
|
getTablesQuery
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EAQXUGP6.js";
|
|
11
11
|
import {
|
|
12
12
|
createConnector,
|
|
13
13
|
resolveConnection
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NXQ6ZO3V.js";
|
|
15
15
|
import {
|
|
16
16
|
detail,
|
|
17
17
|
error,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
success,
|
|
21
21
|
warning
|
|
22
22
|
} from "./chunk-HJVVHYVN.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-RM6MNDVF.js";
|
|
24
|
+
import "./chunk-S7YQXEKM.js";
|
|
25
25
|
import "./chunk-UND73EOB.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-7D4SUZUM.js";
|
|
27
27
|
|
|
28
28
|
// src/commands/warehouse-sync.ts
|
|
29
29
|
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
@@ -160,14 +160,28 @@ function mergeWithDbtCatalog(existingCatalog, warehouseModels) {
|
|
|
160
160
|
async function syncWarehouse(projectDir, connector, connectionType, connectionName, options) {
|
|
161
161
|
const start = performance.now();
|
|
162
162
|
const errors = [];
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
163
|
+
let normalizedTables = [];
|
|
164
|
+
if (connectionType === "bigquery") {
|
|
165
|
+
if (!options?.schemas || options.schemas.length === 0) {
|
|
166
|
+
throw new Error(
|
|
167
|
+
"BigQuery sync requires a dataset. Pass --schema <dataset> (or set config.dataset)."
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
for (const dataset of options.schemas) {
|
|
171
|
+
const q = getTablesQuery(connectionType, { schema: dataset });
|
|
172
|
+
const res = await connector.execute(q.sql);
|
|
173
|
+
normalizedTables.push(...q.normalize(res.rows));
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
const tablesQuery = getTablesQuery(connectionType, {
|
|
177
|
+
database: options?.database
|
|
178
|
+
});
|
|
179
|
+
const tablesResult = await connector.execute(tablesQuery.sql);
|
|
180
|
+
normalizedTables = tablesQuery.normalize(tablesResult.rows);
|
|
181
|
+
if (options?.schemas && options.schemas.length > 0) {
|
|
182
|
+
const schemaSet = new Set(options.schemas.map((s) => s.toUpperCase()));
|
|
183
|
+
normalizedTables = normalizedTables.filter((t) => schemaSet.has(t.schema.toUpperCase()));
|
|
184
|
+
}
|
|
171
185
|
}
|
|
172
186
|
let allColumns = [];
|
|
173
187
|
if (connectionType === "sqlite") {
|
|
@@ -189,6 +203,12 @@ async function syncWarehouse(projectDir, connector, connectionType, connectionNa
|
|
|
189
203
|
errors.push(`Failed to describe ${table.name}: ${err instanceof Error ? err.message : String(err)}`);
|
|
190
204
|
}
|
|
191
205
|
}
|
|
206
|
+
} else if (connectionType === "bigquery") {
|
|
207
|
+
for (const dataset of options.schemas) {
|
|
208
|
+
const q = getColumnsQuery(connectionType, { schema: dataset });
|
|
209
|
+
const res = await connector.execute(q.sql);
|
|
210
|
+
allColumns.push(...q.normalize(res.rows));
|
|
211
|
+
}
|
|
192
212
|
} else {
|
|
193
213
|
const columnsQuery = getColumnsQuery(connectionType, {
|
|
194
214
|
database: options?.database
|
|
@@ -308,7 +328,13 @@ async function runSyncWarehouse(projectDir, options) {
|
|
|
308
328
|
}
|
|
309
329
|
const connection = await resolveConnection(projectDir, connectionOverride);
|
|
310
330
|
const connector = createConnector(connection, projectDir);
|
|
311
|
-
|
|
331
|
+
let schemas = schemasOverride ? schemasOverride.split(",").map((s) => s.trim()) : void 0;
|
|
332
|
+
if ((!schemas || schemas.length === 0) && connection.type === "bigquery") {
|
|
333
|
+
const dataset = connection.config.dataset;
|
|
334
|
+
if (dataset) {
|
|
335
|
+
schemas = [dataset];
|
|
336
|
+
}
|
|
337
|
+
}
|
|
312
338
|
const spin = options.json ? null : spinner(`Connecting to ${connection.name} ...`);
|
|
313
339
|
try {
|
|
314
340
|
await connector.connect();
|
|
@@ -365,4 +391,4 @@ async function runSyncWarehouse(projectDir, options) {
|
|
|
365
391
|
export {
|
|
366
392
|
runSyncWarehouse
|
|
367
393
|
};
|
|
368
|
-
//# sourceMappingURL=sync-warehouse-
|
|
394
|
+
//# sourceMappingURL=sync-warehouse-UWRNUXE7.js.map
|