Skip to content

Commit 8af60fe

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 1cf8b3f commit 8af60fe

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
@@ -167,7 +167,7 @@ export class KsqlDriver extends BaseDriver implements DriverInterface {
167167
}
168168
}
169169

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

@@ -361,7 +361,7 @@ export class KsqlDriver extends BaseDriver implements DriverInterface {
361361
public capabilities(): DriverCapabilities {
362362
return {
363363
streamingSource: true,
364-
unloadWithoutTempTable: true,
364+
unloadWithoutTempTable: !!this.config.kafkaHost,
365365
};
366366
}
367367
}

0 commit comments

Comments
 (0)