Skip to content

Commit 0c2f701

Browse files
committed
fix(ksql-driver): Select queries for ksql allowed only from Cube Store. In order to query ksql create pre-aggregation first if Kafka download isn't enabled
1 parent 7dfaf0c commit 0c2f701

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/cubejs-ksql-driver/src/KsqlDriver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class KsqlDriver extends BaseDriver implements DriverInterface {
169169
}
170170
}
171171

172-
public async query<R = unknown>(query: string, values?: unknown[], options: KsqlQueryOptions = {}): Promise<R> {
172+
public async query<R = unknown>(query: string, values?: unknown[], options: KsqlQueryOptions = {}): Promise<R> {
173173
if (query.toLowerCase().startsWith('select')) {
174174
throw new Error('Select queries for ksql allowed only from Cube Store. In order to query ksql create pre-aggregation first.');
175175
}
@@ -181,7 +181,7 @@ export class KsqlDriver extends BaseDriver implements DriverInterface {
181181
}
182182
} : {})
183183
});
184-
184+
185185
return data[0];
186186
}
187187

@@ -363,7 +363,7 @@ export class KsqlDriver extends BaseDriver implements DriverInterface {
363363
public capabilities(): DriverCapabilities {
364364
return {
365365
streamingSource: true,
366-
unloadWithoutTempTable: true,
366+
unloadWithoutTempTable: !!this.config.kafkaHost,
367367
};
368368
}
369369
}

0 commit comments

Comments
 (0)