mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
feat: pass telemetry project id to semantic daemon
This commit is contained in:
parent
1c6c6c853f
commit
2cbafa3df6
7 changed files with 71 additions and 1 deletions
|
|
@ -90,6 +90,7 @@ export interface PythonSemanticLayerComputeOptions {
|
|||
cwd?: string;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
runJson?: KtxDaemonJsonRunner;
|
||||
projectId?: string;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
|
|
@ -238,6 +239,7 @@ export function createPythonSemanticLayerComputePort(
|
|||
const command = options.command ?? 'python';
|
||||
const args = options.args ?? ['-m', 'ktx_daemon'];
|
||||
const runJson = options.runJson ?? runProcessJson({ command, args, cwd: options.cwd, env: options.env });
|
||||
const projectId = options.projectId;
|
||||
|
||||
return {
|
||||
async query(input) {
|
||||
|
|
@ -245,6 +247,7 @@ export function createPythonSemanticLayerComputePort(
|
|||
sources: input.sources,
|
||||
dialect: input.dialect,
|
||||
query: input.query,
|
||||
...(projectId ? { projectId } : {}),
|
||||
});
|
||||
return {
|
||||
sql: typeof raw.sql === 'string' ? raw.sql : '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue