@vizzly/semantic-layer-public 0.0.241 → 0.0.244
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.
|
@@ -205,6 +205,8 @@ const configSchema = (fullObj, options) => joi_1.default.object({
|
|
|
205
205
|
sqlViews: joi_1.default.object()
|
|
206
206
|
.pattern(joi_1.default.string(), joi_1.default.object({ name: joi_1.default.string().required(), sql: joi_1.default.string().allow('').required() }))
|
|
207
207
|
.optional(),
|
|
208
|
+
runOptions: joi_1.default.object().optional(),
|
|
209
|
+
queryRoutingRules: joi_1.default.array().items(joi_1.default.object()).optional()
|
|
208
210
|
});
|
|
209
211
|
exports.bigQuerySchema = configSchema({}, { onlyClients: ['bigquery'] });
|
|
210
212
|
exports.postgresSchema = configSchema({}, { onlyClients: ['postgres'] });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PartialBy } from '@vizzly/api-client';
|
|
2
|
-
import { Client, NormalizedDataType, SQLQuery, AnyConnection } from '@vizzly/sqlbuilder-public';
|
|
2
|
+
import { Client, NormalizedDataType, SQLQuery, AnyConnection, DataSetType } from '@vizzly/sqlbuilder-public';
|
|
3
3
|
import { SQLOperator } from '@vizzly/sqlbuilder-public';
|
|
4
4
|
export declare namespace nSemanticLayer {
|
|
5
5
|
export namespace Result {
|
|
@@ -23,6 +23,7 @@ export declare namespace nSemanticLayer {
|
|
|
23
23
|
parameters?: Object;
|
|
24
24
|
expires: string;
|
|
25
25
|
signature: string;
|
|
26
|
+
runOptions?: object;
|
|
26
27
|
};
|
|
27
28
|
type Field = {
|
|
28
29
|
/**
|
|
@@ -79,7 +80,7 @@ export declare namespace nSemanticLayer {
|
|
|
79
80
|
/** Fields in the data set... */
|
|
80
81
|
fields: (AddressField | SQLField)[];
|
|
81
82
|
/** What joins are needed on underlying tables to make the right fields available? */
|
|
82
|
-
joins
|
|
83
|
+
joins: JoinOn[];
|
|
83
84
|
/** permanent filters */
|
|
84
85
|
permanentFilters?: SQLQuery['filter'];
|
|
85
86
|
};
|
|
@@ -111,9 +112,21 @@ export declare namespace nSemanticLayer {
|
|
|
111
112
|
sql: string;
|
|
112
113
|
name: string;
|
|
113
114
|
};
|
|
115
|
+
export type QueryRoutingRuleCheckId = 'can_use_pre_aggregated_data';
|
|
116
|
+
export type QueryRoutingRule = {
|
|
117
|
+
onlyIf: {
|
|
118
|
+
check: QueryRoutingRuleCheckId;
|
|
119
|
+
targetDataSetId: string;
|
|
120
|
+
};
|
|
121
|
+
changes: {
|
|
122
|
+
fields: DataSetType['fields'];
|
|
123
|
+
runOptions?: Config['runOptions'];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
114
126
|
export type Config = {
|
|
115
127
|
version: 1;
|
|
116
128
|
dataSets: DataSet[];
|
|
129
|
+
queryRoutingRules?: Array<QueryRoutingRule>;
|
|
117
130
|
executableDashboardConfigForPDF: string | null;
|
|
118
131
|
publicKeys: string[];
|
|
119
132
|
sqlViews: SqlViewStore;
|
|
@@ -125,6 +138,9 @@ export declare namespace nSemanticLayer {
|
|
|
125
138
|
unencryptedCredentials?: AnyConnection;
|
|
126
139
|
};
|
|
127
140
|
};
|
|
141
|
+
runOptions?: {
|
|
142
|
+
[connectionId: string]: object;
|
|
143
|
+
};
|
|
128
144
|
};
|
|
129
145
|
export type LoadedConfig = PartialBy<Config, 'connections' | 'publicKeys' | 'sqlViews' | 'executableDashboardConfigForPDF'>;
|
|
130
146
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly/semantic-layer-public",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.244",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"jest": "^29.7.0",
|
|
22
22
|
"ts-jest": "^29.1.2",
|
|
23
23
|
"typescript": "^5.4.5",
|
|
24
|
-
"@vizzly/sqlbuilder-public": "^0.1.
|
|
24
|
+
"@vizzly/sqlbuilder-public": "^0.1.80"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@vizzly/sqlbuilder-public": ">=0.1.
|
|
27
|
+
"@vizzly/sqlbuilder-public": ">=0.1.80",
|
|
28
28
|
"@vizzly/joi": "^17.11.0"
|
|
29
29
|
}
|
|
30
30
|
}
|