Merge branch 'master' into chore/negated-join-filters
This commit is contained in:
commit
0f43c8f46c
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||||
"version": "2.33.0",
|
"version": "2.33.1",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|
|
@ -173,9 +173,9 @@ export class ExternalRequest<T extends Operation> {
|
||||||
if (!opts.datasource) {
|
if (!opts.datasource) {
|
||||||
if (sdk.views.isView(source)) {
|
if (sdk.views.isView(source)) {
|
||||||
const table = await sdk.views.getTable(source.id)
|
const table = await sdk.views.getTable(source.id)
|
||||||
opts.datasource = await sdk.datasources.get(table.sourceId!)
|
opts.datasource = await sdk.datasources.get(table.sourceId)
|
||||||
} else {
|
} else {
|
||||||
opts.datasource = await sdk.datasources.get(source.sourceId!)
|
opts.datasource = await sdk.datasources.get(source.sourceId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,11 @@ export async function getExternalTable(
|
||||||
if (!entities[tableName]) {
|
if (!entities[tableName]) {
|
||||||
throw new Error(`Unable to find table named "${tableName}"`)
|
throw new Error(`Unable to find table named "${tableName}"`)
|
||||||
}
|
}
|
||||||
return processTable(entities[tableName])
|
const table = await processTable(entities[tableName])
|
||||||
|
if (!table.sourceId) {
|
||||||
|
table.sourceId = datasourceId
|
||||||
|
}
|
||||||
|
return table
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getTable(tableId: string): Promise<Table> {
|
export async function getTable(tableId: string): Promise<Table> {
|
||||||
|
|
Loading…
Reference in New Issue