@finos/legend-application-data-cube 0.7.8 → 0.7.9
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.
- package/lib/components/LegendDataCubeWebApplication.d.ts.map +1 -1
- package/lib/components/LegendDataCubeWebApplication.js +3 -1
- package/lib/components/LegendDataCubeWebApplication.js.map +1 -1
- package/lib/components/builder/source/LakehouseProducerDataCubeSourceBuilder.d.ts.map +1 -1
- package/lib/components/builder/source/LakehouseProducerDataCubeSourceBuilder.js +0 -3
- package/lib/components/builder/source/LakehouseProducerDataCubeSourceBuilder.js.map +1 -1
- package/lib/components/builder/source/LegendDataCubeSourceLoader.d.ts.map +1 -1
- package/lib/components/builder/source/LegendDataCubeSourceLoader.js +1 -3
- package/lib/components/builder/source/LegendDataCubeSourceLoader.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/AuthStore.d.ts +4 -0
- package/lib/stores/AuthStore.d.ts.map +1 -1
- package/lib/stores/AuthStore.js +7 -0
- package/lib/stores/AuthStore.js.map +1 -1
- package/lib/stores/LegendDataCubeBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendDataCubeBaseStore.js +1 -1
- package/lib/stores/LegendDataCubeBaseStore.js.map +1 -1
- package/lib/stores/LegendDataCubeDataCubeEngine.d.ts +7 -5
- package/lib/stores/LegendDataCubeDataCubeEngine.d.ts.map +1 -1
- package/lib/stores/LegendDataCubeDataCubeEngine.js +25 -14
- package/lib/stores/LegendDataCubeDataCubeEngine.js.map +1 -1
- package/lib/stores/LegendDataCubeDuckDBEngine.d.ts +1 -1
- package/lib/stores/LegendDataCubeDuckDBEngine.d.ts.map +1 -1
- package/lib/stores/LegendDataCubeDuckDBEngine.js +2 -8
- package/lib/stores/LegendDataCubeDuckDBEngine.js.map +1 -1
- package/lib/stores/builder/LegendDataCubeBuilderStore.d.ts.map +1 -1
- package/lib/stores/builder/LegendDataCubeBuilderStore.js +0 -4
- package/lib/stores/builder/LegendDataCubeBuilderStore.js.map +1 -1
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceBuilderState.d.ts +0 -3
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceBuilderState.d.ts.map +1 -1
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceBuilderState.js +0 -11
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceBuilderState.js.map +1 -1
- package/lib/stores/model/LakehouseProducerDataCubeSource.d.ts +0 -1
- package/lib/stores/model/LakehouseProducerDataCubeSource.d.ts.map +1 -1
- package/lib/stores/model/LakehouseProducerDataCubeSource.js +0 -2
- package/lib/stores/model/LakehouseProducerDataCubeSource.js.map +1 -1
- package/lib/stores/model/SecondaryOauthClient.d.ts.map +1 -1
- package/lib/stores/model/SecondaryOauthClient.js +3 -2
- package/lib/stores/model/SecondaryOauthClient.js.map +1 -1
- package/package.json +6 -6
- package/src/components/LegendDataCubeWebApplication.tsx +3 -1
- package/src/components/builder/source/LakehouseProducerDataCubeSourceBuilder.tsx +0 -4
- package/src/components/builder/source/LegendDataCubeSourceLoader.tsx +0 -10
- package/src/stores/AuthStore.ts +8 -0
- package/src/stores/LegendDataCubeBaseStore.ts +1 -0
- package/src/stores/LegendDataCubeDataCubeEngine.ts +46 -17
- package/src/stores/LegendDataCubeDuckDBEngine.ts +1 -9
- package/src/stores/builder/LegendDataCubeBuilderStore.tsx +0 -12
- package/src/stores/builder/source/LakehouseProducerDataCubeSourceBuilderState.ts +0 -25
- package/src/stores/model/LakehouseProducerDataCubeSource.ts +0 -2
- package/src/stores/model/SecondaryOauthClient.ts +3 -2
- package/tsconfig.json +0 -2
- package/lib/components/builder/source/LakehouseProducerDataCubeSourceLoader.d.ts +0 -22
- package/lib/components/builder/source/LakehouseProducerDataCubeSourceLoader.d.ts.map +0 -1
- package/lib/components/builder/source/LakehouseProducerDataCubeSourceLoader.js +0 -40
- package/lib/components/builder/source/LakehouseProducerDataCubeSourceLoader.js.map +0 -1
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.d.ts +0 -41
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.d.ts.map +0 -1
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.js +0 -82
- package/lib/stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.js.map +0 -1
- package/src/components/builder/source/LakehouseProducerDataCubeSourceLoader.tsx +0 -75
- package/src/stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.ts +0 -165
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseProducerDataCubeSource.d.ts","sourceRoot":"","sources":["../../../src/stores/model/LakehouseProducerDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,oBAAoB,EAGpB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,wCAAwC,sBAAsB,CAAC;AAE5E,qBAAa,+BAAgC,SAAQ,cAAc;IACjE,KAAK,EAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAC7C,OAAO,EAAG,MAAM,CAAC;IACjB,KAAK,EAAG,MAAM,EAAE,CAAC;IACjB,SAAS,EAAG,MAAM,CAAC;CACpB;AAED,qBAAa,4CAA6C,SAAQ,cAAc;IAC9E,KAAK,EAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAC7C,OAAO,EAAG,MAAM,CAAC;IACjB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,KAAK,EAAG,MAAM,CAAC;IACf,KAAK,EAAG,MAAM,EAAE,CAAC;CAClB;AAED,qBAAa,aAAa;IACxB,UAAU,EAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"LakehouseProducerDataCubeSource.d.ts","sourceRoot":"","sources":["../../../src/stores/model/LakehouseProducerDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,oBAAoB,EAGpB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAG9B,eAAO,MAAM,wCAAwC,sBAAsB,CAAC;AAE5E,qBAAa,+BAAgC,SAAQ,cAAc;IACjE,KAAK,EAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAC7C,OAAO,EAAG,MAAM,CAAC;IACjB,KAAK,EAAG,MAAM,EAAE,CAAC;IACjB,SAAS,EAAG,MAAM,CAAC;CACpB;AAED,qBAAa,4CAA6C,SAAQ,cAAc;IAC9E,KAAK,EAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAC7C,OAAO,EAAG,MAAM,CAAC;IACjB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,KAAK,EAAG,MAAM,CAAC;IACf,KAAK,EAAG,MAAM,EAAE,CAAC;CAClB;AAED,qBAAa,aAAa;IACxB,UAAU,EAAG,MAAM,CAAC;IAEpB,MAAM,CAAC,QAAQ,CAAC,aAAa,sCAI3B;CACH;AAED,qBAAa,kCAAkC;IAC7C,mBAAmB,EAAG,MAAM,CAAC;IAC7B,SAAS,EAAG,MAAM,CAAC;IACnB,eAAe,EAAG,MAAM,CAAC;IACzB,KAAK,EAAG,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,MAAM,CAAC,QAAQ,CAAC,aAAa,2DAW3B;CACH"}
|
|
@@ -33,10 +33,8 @@ export class LakehouseProducerIcebergCachedDataCubeSource extends DataCubeSource
|
|
|
33
33
|
}
|
|
34
34
|
export class IcebergConfig {
|
|
35
35
|
catalogUrl;
|
|
36
|
-
icebergRef;
|
|
37
36
|
static serialization = new SerializationFactory(createModelSchema(IcebergConfig, {
|
|
38
37
|
catalogUrl: primitive(),
|
|
39
|
-
icebergRef: primitive(),
|
|
40
38
|
}));
|
|
41
39
|
}
|
|
42
40
|
export class RawLakehouseProducerDataCubeSource {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseProducerDataCubeSource.js","sourceRoot":"","sources":["../../../src/stores/model/LakehouseProducerDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,GAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEzE,MAAM,CAAC,MAAM,wCAAwC,GAAG,mBAAmB,CAAC;AAE5E,MAAM,OAAO,+BAAgC,SAAQ,cAAc;IACjE,KAAK,CAAwC;IAC7C,OAAO,CAAU;IACjB,KAAK,CAAY;IACjB,SAAS,CAAU;CACpB;AAED,MAAM,OAAO,4CAA6C,SAAQ,cAAc;IAC9E,KAAK,CAAwC;IAC7C,OAAO,CAAU;IACjB,EAAE,CAAU;IACZ,MAAM,CAAU;IAChB,KAAK,CAAU;IACf,KAAK,CAAY;CAClB;AAED,MAAM,OAAO,aAAa;IACxB,UAAU,CAAU;
|
|
1
|
+
{"version":3,"file":"LakehouseProducerDataCubeSource.js","sourceRoot":"","sources":["../../../src/stores/model/LakehouseProducerDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,GAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAi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1
|
+
{"version":3,"file":"SecondaryOauthClient.d.ts","sourceRoot":"","sources":["../../../src/stores/model/SecondaryOauthClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,KAAK,mBAAmB,EAGzB,MAAM,gBAAgB,CAAC;AAExB,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,IAAI,CAAqB;gBAErB,MAAM,EAAE,mBAAmB;IAQvC,2CAA2C;IAC9B,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;CAczC"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
16
17
|
import { UserManager, WebStorageStateStore, } from 'oidc-client-ts';
|
|
17
18
|
export class SecondaryOAuthClient {
|
|
18
19
|
userManager;
|
|
@@ -33,11 +34,11 @@ export class SecondaryOAuthClient {
|
|
|
33
34
|
return this.user.access_token;
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
|
-
this.user = await this.userManager.
|
|
37
|
+
this.user = guaranteeNonNullable(await this.userManager.signinSilent());
|
|
37
38
|
return this.user.access_token;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
this.user = await this.userManager.
|
|
41
|
+
this.user = guaranteeNonNullable(await this.userManager.signinSilent());
|
|
41
42
|
return this.user.access_token;
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecondaryOauthClient.js","sourceRoot":"","sources":["../../../src/stores/model/SecondaryOauthClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EAGX,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,MAAM,OAAO,oBAAoB;IACvB,WAAW,CAAc;IACzB,IAAI,GAAgB,IA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,MAAM;YACT,SAAS,EAAE,IAAI,oBAAoB,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;YACnE,KAAK,EAAE,MAAM,CAAC,gBAAgB,EAAE,KAAe;SAChD,CAAC,CAAC;IACL,CAAC;IAED,2CAA2C;IACpC,KAAK,CAAC,QAAQ;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC5D,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACnE,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;gBACtC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC;gBACxE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;YAChC,CAAC;QACH,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC;QACxE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IAChC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-data-cube",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"description": "Legend DataCube application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"@duckdb/duckdb-wasm": "1.31.0",
|
|
46
46
|
"@finos/legend-application": "16.0.76",
|
|
47
47
|
"@finos/legend-art": "7.1.127",
|
|
48
|
-
"@finos/legend-code-editor": "2.0.
|
|
49
|
-
"@finos/legend-data-cube": "0.3.
|
|
50
|
-
"@finos/legend-graph": "32.3.
|
|
51
|
-
"@finos/legend-query-builder": "4.17.
|
|
48
|
+
"@finos/legend-code-editor": "2.0.128",
|
|
49
|
+
"@finos/legend-data-cube": "0.3.38",
|
|
50
|
+
"@finos/legend-graph": "32.3.9",
|
|
51
|
+
"@finos/legend-query-builder": "4.17.51",
|
|
52
52
|
"@finos/legend-server-depot": "6.1.1",
|
|
53
|
-
"@finos/legend-server-lakehouse": "0.3.
|
|
53
|
+
"@finos/legend-server-lakehouse": "0.3.9",
|
|
54
54
|
"@finos/legend-shared": "11.0.20",
|
|
55
55
|
"@finos/legend-storage": "3.0.139",
|
|
56
56
|
"@types/react": "19.0.10",
|
|
@@ -51,10 +51,12 @@ const LegendDataCubeWebApplicationRouter = observer(() => {
|
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
if (auth.user?.access_token) {
|
|
53
53
|
authStore.setAccessToken(auth.user.access_token);
|
|
54
|
+
authStore.setUserManagerSettings(auth.settings);
|
|
54
55
|
} else {
|
|
55
56
|
authStore.setAccessToken(undefined);
|
|
57
|
+
authStore.setUserManagerSettings(undefined);
|
|
56
58
|
}
|
|
57
|
-
}, [auth
|
|
59
|
+
}, [auth]);
|
|
58
60
|
|
|
59
61
|
return (
|
|
60
62
|
<div className="h-full">
|
|
@@ -42,10 +42,6 @@ export const LakehouseProducerDataCubeSourceBuilder: React.FC<{
|
|
|
42
42
|
state.reset();
|
|
43
43
|
}, [state]);
|
|
44
44
|
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
state.setUserManagerSettings(auth.settings);
|
|
47
|
-
}, [state, auth]);
|
|
48
|
-
|
|
49
45
|
function createUrnPairs(
|
|
50
46
|
urns: string[],
|
|
51
47
|
): Record<string, string | undefined>[] {
|
|
@@ -23,8 +23,6 @@ import { DataCubeIcon } from '@finos/legend-art';
|
|
|
23
23
|
import { formatDistanceToNow } from '@finos/legend-shared';
|
|
24
24
|
import type { LegendDataCubeSourceLoaderState } from '../../../stores/builder/source/LegendDataCubeSourceLoaderState.js';
|
|
25
25
|
import { LegendDataCubeBlockingWindow } from '../../LegendDataCubeBlockingWindow.js';
|
|
26
|
-
import type { LakehouseProducerDataCubeSourceLoaderState } from '../../../stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.js';
|
|
27
|
-
import { LakehouseProducerDataCubeSourceLoader } from './LakehouseProducerDataCubeSourceLoader.js';
|
|
28
26
|
import { LegendDataCubeSourceBuilderType } from '../../../stores/builder/source/LegendDataCubeSourceBuilderState.js';
|
|
29
27
|
|
|
30
28
|
export const LegendDataCubeSourceLoader = observer(
|
|
@@ -90,14 +88,6 @@ export const LegendDataCubeSourceLoader = observer(
|
|
|
90
88
|
}
|
|
91
89
|
/>
|
|
92
90
|
)}
|
|
93
|
-
{state.label ===
|
|
94
|
-
LegendDataCubeSourceBuilderType.LAKEHOUSE_PRODUCER && (
|
|
95
|
-
<LakehouseProducerDataCubeSourceLoader
|
|
96
|
-
partialSourceLoader={
|
|
97
|
-
state as LakehouseProducerDataCubeSourceLoaderState
|
|
98
|
-
}
|
|
99
|
-
/>
|
|
100
|
-
)}
|
|
101
91
|
</div>
|
|
102
92
|
</div>
|
|
103
93
|
</div>
|
package/src/stores/AuthStore.ts
CHANGED
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { makeAutoObservable } from 'mobx';
|
|
18
|
+
import type { UserManagerSettings } from 'oidc-client-ts';
|
|
18
19
|
|
|
19
20
|
class AuthStore {
|
|
20
21
|
accessToken: string | undefined = undefined;
|
|
22
|
+
userManagerSettings: UserManagerSettings | undefined = undefined;
|
|
21
23
|
constructor() {
|
|
22
24
|
makeAutoObservable(this);
|
|
23
25
|
}
|
|
@@ -27,6 +29,12 @@ class AuthStore {
|
|
|
27
29
|
getAccessToken(): string | undefined {
|
|
28
30
|
return this.accessToken;
|
|
29
31
|
}
|
|
32
|
+
setUserManagerSettings(settings?: UserManagerSettings) {
|
|
33
|
+
this.userManagerSettings = settings;
|
|
34
|
+
}
|
|
35
|
+
getUserManagerSettings(): UserManagerSettings | undefined {
|
|
36
|
+
return this.userManagerSettings;
|
|
37
|
+
}
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
export const authStore = new AuthStore();
|
|
@@ -172,24 +172,29 @@ import {
|
|
|
172
172
|
import {
|
|
173
173
|
isEnvNameCompatibleWithEntitlementsLakehouseEnvironmentType,
|
|
174
174
|
type LakehouseContractServerClient,
|
|
175
|
+
type LakehouseIngestServerClient,
|
|
175
176
|
} from '@finos/legend-server-lakehouse';
|
|
176
177
|
import { authStore } from './AuthStore.js';
|
|
177
178
|
import { extractEntityNameFromPath } from '@finos/legend-storage';
|
|
179
|
+
import { SecondaryOAuthClient } from './model/SecondaryOauthClient.js';
|
|
178
180
|
|
|
179
181
|
export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
180
182
|
private readonly _application: LegendDataCubeApplicationStore;
|
|
181
183
|
private readonly _depotServerClient: DepotServerClient;
|
|
182
184
|
private readonly _engineServerClient: V1_EngineServerClient;
|
|
183
185
|
private readonly _lakehouseContractServerClient: LakehouseContractServerClient;
|
|
186
|
+
private readonly _lakehouseIngestServerClient: LakehouseIngestServerClient;
|
|
184
187
|
private readonly _graphManager: V1_PureGraphManager;
|
|
185
188
|
private readonly _duckDBEngine: LegendDataCubeDuckDBEngine;
|
|
186
|
-
private
|
|
189
|
+
private _secondaryOauthClient?: SecondaryOAuthClient;
|
|
190
|
+
private LAKEHOUSE_SECTION = '###Lakehouse';
|
|
187
191
|
|
|
188
192
|
constructor(
|
|
189
193
|
application: LegendDataCubeApplicationStore,
|
|
190
194
|
depotServerClient: DepotServerClient,
|
|
191
195
|
engineServerClient: V1_EngineServerClient,
|
|
192
196
|
lakehouseContractServerClient: LakehouseContractServerClient,
|
|
197
|
+
lakehouseIngestServerClient: LakehouseIngestServerClient,
|
|
193
198
|
graphManager: V1_PureGraphManager,
|
|
194
199
|
) {
|
|
195
200
|
super();
|
|
@@ -199,9 +204,19 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
199
204
|
this._engineServerClient = engineServerClient;
|
|
200
205
|
this._graphManager = graphManager;
|
|
201
206
|
this._lakehouseContractServerClient = lakehouseContractServerClient;
|
|
207
|
+
this._lakehouseIngestServerClient = lakehouseIngestServerClient;
|
|
202
208
|
this._duckDBEngine = new LegendDataCubeDuckDBEngine();
|
|
203
209
|
}
|
|
204
210
|
|
|
211
|
+
private get secondaryOauthClient(): SecondaryOAuthClient {
|
|
212
|
+
if (!this._secondaryOauthClient) {
|
|
213
|
+
this._secondaryOauthClient = new SecondaryOAuthClient(
|
|
214
|
+
guaranteeNonNullable(authStore.getUserManagerSettings()),
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
return this._secondaryOauthClient;
|
|
218
|
+
}
|
|
219
|
+
|
|
205
220
|
async initialize() {
|
|
206
221
|
await this._duckDBEngine.initialize();
|
|
207
222
|
}
|
|
@@ -720,13 +735,15 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
720
735
|
const rawSource =
|
|
721
736
|
RawLakehouseProducerDataCubeSource.serialization.fromJson(value);
|
|
722
737
|
|
|
723
|
-
if (
|
|
724
|
-
rawSource.icebergConfig?.icebergRef &&
|
|
725
|
-
rawSource.icebergConfig.catalogUrl
|
|
726
|
-
) {
|
|
738
|
+
if (rawSource.icebergConfig?.catalogUrl) {
|
|
727
739
|
const source = new LakehouseProducerIcebergCachedDataCubeSource();
|
|
740
|
+
const refId = await this._duckDBEngine.ingestIcebergTable(
|
|
741
|
+
rawSource.warehouse,
|
|
742
|
+
rawSource.paths,
|
|
743
|
+
await this.secondaryOauthClient.getToken(),
|
|
744
|
+
);
|
|
728
745
|
const tableCatalog = this._duckDBEngine.retrieveCatalogTable(
|
|
729
|
-
|
|
746
|
+
refId.dbReference,
|
|
730
747
|
);
|
|
731
748
|
source.paths = rawSource.paths;
|
|
732
749
|
|
|
@@ -784,7 +801,7 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
784
801
|
query.value = ingestAccesor;
|
|
785
802
|
source.query = query;
|
|
786
803
|
|
|
787
|
-
const model = this._synthesizeLakehouseProducerPMCD(
|
|
804
|
+
const model = await this._synthesizeLakehouseProducerPMCD(
|
|
788
805
|
rawSource,
|
|
789
806
|
source,
|
|
790
807
|
);
|
|
@@ -1335,12 +1352,6 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
1335
1352
|
return this._engineServerClient.grammarToJSON_model(code);
|
|
1336
1353
|
}
|
|
1337
1354
|
|
|
1338
|
-
// ---------------------------------- INGEST ---------------------------------------
|
|
1339
|
-
|
|
1340
|
-
registerIngestDefinition(ingestDefinition: PlainObject | undefined) {
|
|
1341
|
-
this._ingestDefinition = ingestDefinition;
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
1355
|
// ---------------------------------- CACHING --------------------------------------
|
|
1345
1356
|
|
|
1346
1357
|
override async initializeCache(
|
|
@@ -1707,14 +1718,12 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
1707
1718
|
warehouse: string,
|
|
1708
1719
|
paths: string[],
|
|
1709
1720
|
catalogApi: string,
|
|
1710
|
-
refId?: string,
|
|
1711
1721
|
token?: string,
|
|
1712
1722
|
) {
|
|
1713
1723
|
const { dbReference } = await this._duckDBEngine.ingestIcebergTable(
|
|
1714
1724
|
warehouse,
|
|
1715
1725
|
paths,
|
|
1716
1726
|
catalogApi,
|
|
1717
|
-
refId,
|
|
1718
1727
|
token,
|
|
1719
1728
|
);
|
|
1720
1729
|
return { dbReference };
|
|
@@ -1839,7 +1848,7 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
1839
1848
|
};
|
|
1840
1849
|
}
|
|
1841
1850
|
|
|
1842
|
-
private _synthesizeLakehouseProducerPMCD(
|
|
1851
|
+
private async _synthesizeLakehouseProducerPMCD(
|
|
1843
1852
|
rawSource: RawLakehouseProducerDataCubeSource,
|
|
1844
1853
|
source: LakehouseProducerDataCubeSource,
|
|
1845
1854
|
) {
|
|
@@ -1859,7 +1868,27 @@ export class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
1859
1868
|
|
|
1860
1869
|
const model = new V1_PureModelContextData();
|
|
1861
1870
|
const ingestDefinition = new V1_IngestDefinition();
|
|
1862
|
-
|
|
1871
|
+
// call the API
|
|
1872
|
+
const ingestGrammar =
|
|
1873
|
+
await this._lakehouseIngestServerClient.getIngestDefinitionGrammar(
|
|
1874
|
+
rawSource.ingestDefinitionUrn,
|
|
1875
|
+
rawSource.ingestServerUrl,
|
|
1876
|
+
authStore.getAccessToken(),
|
|
1877
|
+
);
|
|
1878
|
+
|
|
1879
|
+
const ingestPMCDPlainObject = await this.parseCompatibleModel(
|
|
1880
|
+
`${this.LAKEHOUSE_SECTION}\n${ingestGrammar}`,
|
|
1881
|
+
);
|
|
1882
|
+
|
|
1883
|
+
const ingestDefPMCD = guaranteeType(
|
|
1884
|
+
V1_deserializePureModelContext(ingestPMCDPlainObject),
|
|
1885
|
+
V1_PureModelContextData,
|
|
1886
|
+
);
|
|
1887
|
+
|
|
1888
|
+
const ingestDefinitionObject = (
|
|
1889
|
+
ingestDefPMCD.elements.at(0) as V1_IngestDefinition
|
|
1890
|
+
).content;
|
|
1891
|
+
ingestDefinition.content = ingestDefinitionObject;
|
|
1863
1892
|
const splits = rawSource.paths[0]?.split('::');
|
|
1864
1893
|
ingestDefinition.name = guaranteeNonNullable(splits?.pop());
|
|
1865
1894
|
ingestDefinition.package = guaranteeNonNullable(
|
|
@@ -272,16 +272,8 @@ export class LegendDataCubeDuckDBEngine {
|
|
|
272
272
|
warehouse: string,
|
|
273
273
|
paths: string[],
|
|
274
274
|
catalogApi: string,
|
|
275
|
-
refId?: string,
|
|
276
275
|
token?: string,
|
|
277
276
|
) {
|
|
278
|
-
if (!isNullable(refId) && this._catalog.has(refId)) {
|
|
279
|
-
guaranteeNonNullable(this._catalog.get(refId));
|
|
280
|
-
return {
|
|
281
|
-
dbReference: refId,
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
|
|
285
277
|
const schemaName = LegendDataCubeDuckDBEngine.DUCKDB_DEFAULT_SCHEMA_NAME;
|
|
286
278
|
LegendDataCubeDuckDBEngine.ingestFileTableCounter += 1;
|
|
287
279
|
const tableName = `${LegendDataCubeDuckDBEngine.INGEST_TABLE_NAME_PREFIX}${LegendDataCubeDuckDBEngine.ingestFileTableCounter}`;
|
|
@@ -322,7 +314,7 @@ export class LegendDataCubeDuckDBEngine {
|
|
|
322
314
|
]);
|
|
323
315
|
await connection.close();
|
|
324
316
|
|
|
325
|
-
const ref =
|
|
317
|
+
const ref = uuid();
|
|
326
318
|
this._catalog.set(ref, {
|
|
327
319
|
schemaName,
|
|
328
320
|
tableName,
|
|
@@ -75,8 +75,6 @@ import type {
|
|
|
75
75
|
LakehouseIngestServerClient,
|
|
76
76
|
LakehousePlatformServerClient,
|
|
77
77
|
} from '@finos/legend-server-lakehouse';
|
|
78
|
-
import { LAKEHOUSE_PRODUCER_DATA_CUBE_SOURCE_TYPE } from '../model/LakehouseProducerDataCubeSource.js';
|
|
79
|
-
import { LakehouseProducerDataCubeSourceLoaderState } from './source/LakehouseProducerDataCubeSourceLoaderState.js';
|
|
80
78
|
|
|
81
79
|
export class LegendDataCubeBuilderState {
|
|
82
80
|
readonly uuid = uuid();
|
|
@@ -349,16 +347,6 @@ export class LegendDataCubeBuilderStore {
|
|
|
349
347
|
onSuccess,
|
|
350
348
|
onError,
|
|
351
349
|
);
|
|
352
|
-
case LAKEHOUSE_PRODUCER_DATA_CUBE_SOURCE_TYPE:
|
|
353
|
-
return new LakehouseProducerDataCubeSourceLoaderState(
|
|
354
|
-
this.application,
|
|
355
|
-
this.engine,
|
|
356
|
-
this.alertService,
|
|
357
|
-
sourceData,
|
|
358
|
-
persistentDataCube,
|
|
359
|
-
onSuccess,
|
|
360
|
-
onError,
|
|
361
|
-
);
|
|
362
350
|
default:
|
|
363
351
|
throw new UnsupportedOperationError(
|
|
364
352
|
`Can't create source loader for unsupported type '${sourceData._type}'`,
|
|
@@ -47,8 +47,6 @@ import {
|
|
|
47
47
|
V1_deserializePureModelContext,
|
|
48
48
|
V1_PureModelContextData,
|
|
49
49
|
} from '@finos/legend-graph';
|
|
50
|
-
import type { UserManagerSettings } from 'oidc-client-ts';
|
|
51
|
-
import { SecondaryOAuthClient } from '../../model/SecondaryOauthClient.js';
|
|
52
50
|
|
|
53
51
|
export class LakehouseProducerDataCubeSourceBuilderState extends LegendDataCubeSourceBuilderState {
|
|
54
52
|
deploymentId: number | undefined;
|
|
@@ -67,8 +65,6 @@ export class LakehouseProducerDataCubeSourceBuilderState extends LegendDataCubeS
|
|
|
67
65
|
catalogUrl: string | undefined;
|
|
68
66
|
milestoning: boolean;
|
|
69
67
|
|
|
70
|
-
userManagerSettings: UserManagerSettings | undefined;
|
|
71
|
-
|
|
72
68
|
private LAKEHOUSE_SECTION = '###Lakehouse';
|
|
73
69
|
|
|
74
70
|
readonly _platformServerClient: LakehousePlatformServerClient;
|
|
@@ -147,10 +143,6 @@ export class LakehouseProducerDataCubeSourceBuilderState extends LegendDataCubeS
|
|
|
147
143
|
this.enableIceberg = enable;
|
|
148
144
|
}
|
|
149
145
|
|
|
150
|
-
setUserManagerSettings(settings: UserManagerSettings) {
|
|
151
|
-
this.userManagerSettings = settings;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
146
|
async fetchIngestUrns(access_token: string | undefined) {
|
|
155
147
|
//TODO: we should retry this method if access token is invalid
|
|
156
148
|
this.resetDeployment(this.deploymentId);
|
|
@@ -337,35 +329,18 @@ export class LakehouseProducerDataCubeSourceBuilderState extends LegendDataCubeS
|
|
|
337
329
|
}
|
|
338
330
|
|
|
339
331
|
override async generateSourceData(): Promise<PlainObject> {
|
|
340
|
-
// register ingest definition
|
|
341
|
-
|
|
342
332
|
const rawSource = new RawLakehouseProducerDataCubeSource();
|
|
343
333
|
// build data cube source
|
|
344
334
|
if (this.enableIceberg) {
|
|
345
|
-
const oauthClient = new SecondaryOAuthClient(
|
|
346
|
-
guaranteeNonNullable(this.userManagerSettings),
|
|
347
|
-
);
|
|
348
335
|
this.milestoning =
|
|
349
336
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
350
337
|
(this.ingestDefinition as any).writeMode._type === 'batch_milestoned';
|
|
351
338
|
this.createIcebergPath();
|
|
352
339
|
const icebergConfig = new IcebergConfig();
|
|
353
340
|
icebergConfig.catalogUrl = guaranteeNonNullable(this.catalogUrl);
|
|
354
|
-
|
|
355
|
-
const token = await oauthClient.getToken();
|
|
356
|
-
|
|
357
|
-
const refId = await this._engine.ingestIcebergTable(
|
|
358
|
-
guaranteeNonNullable(this.warehouse),
|
|
359
|
-
this.paths,
|
|
360
|
-
guaranteeNonNullable(this.catalogUrl),
|
|
361
|
-
undefined,
|
|
362
|
-
token,
|
|
363
|
-
);
|
|
364
|
-
icebergConfig.icebergRef = refId.dbReference;
|
|
365
341
|
rawSource.icebergConfig = icebergConfig;
|
|
366
342
|
} else {
|
|
367
343
|
this.createPath();
|
|
368
|
-
this._engine.registerIngestDefinition(this.ingestDefinition);
|
|
369
344
|
}
|
|
370
345
|
rawSource.ingestDefinitionUrn = guaranteeNonNullable(
|
|
371
346
|
this.selectedIngestUrn,
|
|
@@ -44,12 +44,10 @@ export class LakehouseProducerIcebergCachedDataCubeSource extends DataCubeSource
|
|
|
44
44
|
|
|
45
45
|
export class IcebergConfig {
|
|
46
46
|
catalogUrl!: string;
|
|
47
|
-
icebergRef!: string;
|
|
48
47
|
|
|
49
48
|
static readonly serialization = new SerializationFactory(
|
|
50
49
|
createModelSchema(IcebergConfig, {
|
|
51
50
|
catalogUrl: primitive(),
|
|
52
|
-
icebergRef: primitive(),
|
|
53
51
|
}),
|
|
54
52
|
);
|
|
55
53
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
17
18
|
import {
|
|
18
19
|
UserManager,
|
|
19
20
|
type UserManagerSettings,
|
|
@@ -41,11 +42,11 @@ export class SecondaryOAuthClient {
|
|
|
41
42
|
if (Date.now() < exp - 10 * 60 * 1000) {
|
|
42
43
|
return this.user.access_token;
|
|
43
44
|
} else {
|
|
44
|
-
this.user = await this.userManager.
|
|
45
|
+
this.user = guaranteeNonNullable(await this.userManager.signinSilent());
|
|
45
46
|
return this.user.access_token;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
this.user = await this.userManager.
|
|
49
|
+
this.user = guaranteeNonNullable(await this.userManager.signinSilent());
|
|
49
50
|
return this.user.access_token;
|
|
50
51
|
}
|
|
51
52
|
}
|
package/tsconfig.json
CHANGED
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"./src/stores/builder/source/FreeformTDSExpressionDataCubeSourceBuilderState.ts",
|
|
71
71
|
"./src/stores/builder/source/LakehouseConsumerDataCubeSourceBuilderState.ts",
|
|
72
72
|
"./src/stores/builder/source/LakehouseProducerDataCubeSourceBuilderState.ts",
|
|
73
|
-
"./src/stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.ts",
|
|
74
73
|
"./src/stores/builder/source/LegendDataCubeSourceBuilderState.ts",
|
|
75
74
|
"./src/stores/builder/source/LegendQueryDataCubeSourceBuilderState.ts",
|
|
76
75
|
"./src/stores/builder/source/LegendQueryDataCubeSourceBuilderStateHelper.ts",
|
|
@@ -98,7 +97,6 @@
|
|
|
98
97
|
"./src/components/builder/source/FreeformTDSExpressionDataCubeSourceBuilder.tsx",
|
|
99
98
|
"./src/components/builder/source/LakehouseConsumerDataCubeSourceBuilder.tsx",
|
|
100
99
|
"./src/components/builder/source/LakehouseProducerDataCubeSourceBuilder.tsx",
|
|
101
|
-
"./src/components/builder/source/LakehouseProducerDataCubeSourceLoader.tsx",
|
|
102
100
|
"./src/components/builder/source/LegendDataCubeSourceLoader.tsx",
|
|
103
101
|
"./src/components/builder/source/LegendQueryDataCubeSourceBuilder.tsx",
|
|
104
102
|
"./src/components/builder/source/LegendQueryDataCubeSourceBuilder_DataCubeApplicationPlugin.tsx",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { LakehouseProducerDataCubeSourceLoaderState } from '../../../stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.js';
|
|
17
|
-
export declare const LakehouseProducerDataCubeSourceLoader: ((props: {
|
|
18
|
-
partialSourceLoader: LakehouseProducerDataCubeSourceLoaderState;
|
|
19
|
-
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
20
|
-
displayName: string;
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=LakehouseProducerDataCubeSourceLoader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseProducerDataCubeSourceLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/builder/source/LakehouseProducerDataCubeSourceLoader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,8EAA8E,CAAC;AAK/I,eAAO,MAAM,qCAAqC,WACxC;IACN,mBAAmB,EAAE,0CAA0C,CAAC;CACjE;;CAgDF,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import { useEffect } from 'react';
|
|
19
|
-
import { useAuth } from 'react-oidc-context';
|
|
20
|
-
import { useLegendDataCubeBuilderStore } from '../LegendDataCubeBuilderStoreProvider.js';
|
|
21
|
-
import { FormButton, FormTextInput } from '@finos/legend-data-cube';
|
|
22
|
-
export const LakehouseProducerDataCubeSourceLoader = observer((props) => {
|
|
23
|
-
const { partialSourceLoader } = props;
|
|
24
|
-
const auth = useAuth();
|
|
25
|
-
const store = useLegendDataCubeBuilderStore();
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
partialSourceLoader.reset();
|
|
28
|
-
}, [partialSourceLoader]);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
partialSourceLoader.setUserManagerSettings(auth.settings);
|
|
31
|
-
}, [partialSourceLoader, auth]);
|
|
32
|
-
return (_jsx("div", { className: "flex h-full w-full", children: _jsx("div", { className: "m-3 flex w-full flex-col items-stretch gap-2 text-neutral-500", children: _jsxs("div", { className: "query-setup__wizard__group", children: [_jsx("div", { className: "query-setup__wizard__group__title", children: "Ingest Urn" }), _jsxs("div", { className: "flex h-full w-full flex-auto items-center justify-between text-nowrap", children: [_jsx(FormTextInput, { className: "w-3/4 text-base", value: partialSourceLoader.ingestDefinitionUrn, disabled: true }), _jsx(FormButton, { compact: true, className: "ml-1.5 text-nowrap text-sm text-black", onClick: () => {
|
|
33
|
-
partialSourceLoader
|
|
34
|
-
.loadIngestDefinition(auth.user?.access_token, store.ingestServerClient)
|
|
35
|
-
.catch((error) => store.alertService.alertUnhandledError(error));
|
|
36
|
-
}, children: Boolean(partialSourceLoader.ingestDefinition)
|
|
37
|
-
? 'Loaded!'
|
|
38
|
-
: 'Load Ingest' })] })] }) }) }));
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=LakehouseProducerDataCubeSourceLoader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseProducerDataCubeSourceLoader.js","sourceRoot":"","sources":["../../../../src/components/builder/source/LakehouseProducerDataCubeSourceLoader.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,CAAC,MAAM,qCAAqC,GAAG,QAAQ,CAC3D,CAAC,KAEA,EAAE,EAAE;IACH,MAAM,E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
-
* Copyright (c) 2025-present, Goldman Sachs
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { type PlainObject } from '@finos/legend-shared';
|
|
17
|
-
import type { LegendDataCubeApplicationStore } from '../../LegendDataCubeBaseStore.js';
|
|
18
|
-
import type { LegendDataCubeDataCubeEngine } from '../../LegendDataCubeDataCubeEngine.js';
|
|
19
|
-
import { LegendDataCubeSourceLoaderState } from './LegendDataCubeSourceLoaderState.js';
|
|
20
|
-
import type { DataCubeAlertService } from '@finos/legend-data-cube';
|
|
21
|
-
import { type PersistentDataCube } from '@finos/legend-graph';
|
|
22
|
-
import type { LakehouseIngestServerClient } from '@finos/legend-server-lakehouse';
|
|
23
|
-
import { LegendDataCubeSourceBuilderType } from './LegendDataCubeSourceBuilderState.js';
|
|
24
|
-
import type { UserManagerSettings } from 'oidc-client-ts';
|
|
25
|
-
export declare class LakehouseProducerDataCubeSourceLoaderState extends LegendDataCubeSourceLoaderState {
|
|
26
|
-
ingestDefinition: PlainObject | undefined;
|
|
27
|
-
ingestDefinitionUrn: string;
|
|
28
|
-
ingestServerUrl: string;
|
|
29
|
-
private userManagerSettings;
|
|
30
|
-
private LAKEHOUSE_SECTION;
|
|
31
|
-
constructor(application: LegendDataCubeApplicationStore, engine: LegendDataCubeDataCubeEngine, alertService: DataCubeAlertService, sourceData: PlainObject, persistentDataCube: PersistentDataCube, onSuccess: () => Promise<void>, onError: (error: unknown) => Promise<void>);
|
|
32
|
-
setIngestDefinition(ingestDefinition: PlainObject | undefined): void;
|
|
33
|
-
setIngestDefinitionUrn(urn: string): void;
|
|
34
|
-
setUserManagerSettings(settings: UserManagerSettings | undefined): void;
|
|
35
|
-
get isValid(): boolean;
|
|
36
|
-
get label(): LegendDataCubeSourceBuilderType;
|
|
37
|
-
reset(): void;
|
|
38
|
-
loadIngestDefinition(access_token: string | undefined, lakehouseIngestServerClient: LakehouseIngestServerClient): Promise<void>;
|
|
39
|
-
load(source: PlainObject | undefined): Promise<PlainObject<T>>;
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=LakehouseProducerDataCubeSourceLoaderState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LakehouseProducerDataCubeSourceLoaderState.d.ts","sourceRoot":"","sources":["../../../../src/stores/builder/source/LakehouseProducerDataCubeSourceLoaderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAGL,KAAK,kBAAkB,EAExB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,qBAAa,0CAA2C,SAAQ,+BAA+B;IAC7F,gBAAgB,EAAE,WAAW,GAAG,SAAS,CAA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