Skip to content

Commit 486c0b9

Browse files
ISSUE #2968-CLT: Trino Exporter (#25970)
* feat(metadata exporter): trino exporter * Update generated TypeScript types --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> (cherry picked from commit 71d6d1a)
1 parent df54ad4 commit 486c0b9

6 files changed

Lines changed: 277 additions & 3 deletions

File tree

openmetadata-spec/src/main/resources/json/schema/entity/applications/configuration/external/metadataExporterAppConfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
},
8181
{
8282
"$ref": "metadataExporterConnectors/bigQueryConnection.json"
83+
},
84+
{
85+
"$ref": "metadataExporterConnectors/trinoConnection.json"
8386
}
8487
]
8588
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"$id": "https://open-metadata.org/schema/entity/services/connections/database/trinoConnection.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"title": "TrinoConnection",
5+
"description": "Trino Connection Config",
6+
"type": "object",
7+
"definitions": {
8+
"trinoType": {
9+
"description": "Service type.",
10+
"type": "string",
11+
"enum": [
12+
"Trino"
13+
],
14+
"default": "Trino"
15+
},
16+
"trinoScheme": {
17+
"description": "SQLAlchemy driver scheme options.",
18+
"type": "string",
19+
"enum": [
20+
"trino"
21+
],
22+
"default": "trino"
23+
}
24+
},
25+
"properties": {
26+
"type": {
27+
"title": "Service Type",
28+
"description": "Service Type",
29+
"$ref": "#/definitions/trinoType",
30+
"default": "Trino"
31+
},
32+
"scheme": {
33+
"title": "Connection Scheme",
34+
"description": "SQLAlchemy driver scheme options.",
35+
"$ref": "#/definitions/trinoScheme",
36+
"default": "trino"
37+
},
38+
"username": {
39+
"title": "Username",
40+
"description": "Username to connect to Trino.",
41+
"type": "string"
42+
},
43+
"authType": {
44+
"title": "Auth Configuration Type",
45+
"description": "Choose Auth Config Type.",
46+
"oneOf": [
47+
{
48+
"$ref": "../../../../services/connections/database/common/basicAuth.json"
49+
},
50+
{
51+
"$ref": "../../../../services/connections/database/common/jwtAuth.json"
52+
},
53+
{
54+
"$ref": "../../../../services/connections/database/common/azureConfig.json"
55+
},
56+
{
57+
"$ref": "../../../../services/connections/database/common/noConfigAuthenticationTypes.json"
58+
}
59+
]
60+
},
61+
"hostPort": {
62+
"title": "Host and Port",
63+
"description": "Host and port of the Trino service.",
64+
"type": "string"
65+
},
66+
"catalog": {
67+
"title": "Catalog",
68+
"description": "Catalog of the data source.",
69+
"type": "string"
70+
},
71+
"databaseSchema": {
72+
"title": "Database Schema",
73+
"description": "Database Schema of the data source.",
74+
"type": "string"
75+
},
76+
"connectionOptions": {
77+
"title": "Connection Options",
78+
"$ref": "../../../../services/connections/connectionBasicType.json#/definitions/connectionOptions"
79+
},
80+
"connectionArguments": {
81+
"title": "Connection Arguments",
82+
"$ref": "../../../../services/connections/connectionBasicType.json#/definitions/connectionArguments"
83+
}
84+
},
85+
"additionalProperties": false,
86+
"required": [
87+
"hostPort",
88+
"username"
89+
]
90+
}

openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface CreateTestDefinition {
1818
/**
1919
* Description of the testcase.
2020
*/
21-
description: string;
21+
description?: string;
2222
/**
2323
* Display Name that identifies this test case.
2424
*/

openmetadata-ui/src/main/resources/ui/src/generated/entity/applications/configuration/external/metadataExporterAppConfig.ts

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export interface MetadataExporterAppConfig {
5050
* Databricks Connection Config
5151
*
5252
* Google BigQuery Connection Config
53+
*
54+
* Trino Connection Config
5355
*/
5456
export interface Connection {
5557
/**
@@ -102,6 +104,8 @@ export interface Connection {
102104
/**
103105
* Username to connect to Snowflake. This user should have privileges to read all the
104106
* metadata in Snowflake.
107+
*
108+
* Username to connect to Trino.
105109
*/
106110
username?: string;
107111
/**
@@ -110,12 +114,16 @@ export interface Connection {
110114
warehouse?: string;
111115
/**
112116
* Choose between different authentication types for Databricks.
117+
*
118+
* Choose Auth Config Type.
113119
*/
114-
authType?: AuthenticationType;
120+
authType?: AuthenticationType | NoConfigAuthenticationTypes;
115121
/**
116122
* Catalog of the data source(Example: hive_metastore). This is optional parameter, if you
117123
* would like to restrict the metadata reading to a single catalog. When left blank,
118124
* OpenMetadata Ingestion attempts to scan all the catalog.
125+
*
126+
* Catalog of the data source.
119127
*/
120128
catalog?: string;
121129
/**
@@ -128,12 +136,16 @@ export interface Connection {
128136
* Database Schema of the data source. This is optional parameter, if you would like to
129137
* restrict the metadata reading to a single schema. When left blank, OpenMetadata Ingestion
130138
* attempts to scan all the schemas.
139+
*
140+
* Database Schema of the data source.
131141
*/
132142
databaseSchema?: string;
133143
/**
134144
* Host and port of the Databricks service.
135145
*
136146
* BigQuery APIs URL.
147+
*
148+
* Host and port of the Trino service.
137149
*/
138150
hostPort?: string;
139151
/**
@@ -174,6 +186,10 @@ export interface Connection {
174186
*
175187
* Azure Active Directory authentication for Azure Databricks workspaces using Service
176188
* Principal.
189+
*
190+
* Common Database Connection Config
191+
*
192+
* Azure Database Connection Config
177193
*/
178194
export interface AuthenticationType {
179195
/**
@@ -203,6 +219,52 @@ export interface AuthenticationType {
203219
* Azure Active Directory Tenant ID where your Service Principal is registered.
204220
*/
205221
azureTenantId?: string;
222+
/**
223+
* Password to connect to source.
224+
*/
225+
password?: string;
226+
/**
227+
* JWT to connect to source.
228+
*/
229+
jwt?: string;
230+
azureConfig?: AzureCredentials;
231+
}
232+
233+
/**
234+
* Azure Cloud Credentials
235+
*/
236+
export interface AzureCredentials {
237+
/**
238+
* Account Name of your storage account
239+
*/
240+
accountName?: string;
241+
/**
242+
* Your Service Principal App ID (Client ID)
243+
*/
244+
clientId?: string;
245+
/**
246+
* Your Service Principal Password (Client Secret)
247+
*/
248+
clientSecret?: string;
249+
/**
250+
* Scopes to get access token, for e.g. api://6dfX33ab-XXXX-49df-XXXX-3459eX817d3e/.default
251+
*/
252+
scopes?: string;
253+
/**
254+
* Tenant ID of your Azure Subscription
255+
*/
256+
tenantId?: string;
257+
/**
258+
* Key Vault Name
259+
*/
260+
vaultName?: string;
261+
}
262+
263+
/**
264+
* Database Authentication types not requiring config.
265+
*/
266+
export enum NoConfigAuthenticationTypes {
267+
OAuth2 = "OAuth2",
206268
}
207269

208270
/**
@@ -331,6 +393,7 @@ export enum Scheme {
331393
Bigquery = "bigquery",
332394
DatabricksConnector = "databricks+connector",
333395
Snowflake = "snowflake",
396+
Trino = "trino",
334397
}
335398

336399
/**
@@ -342,6 +405,7 @@ export enum Type {
342405
BigQuery = "BigQuery",
343406
Databricks = "Databricks",
344407
Snowflake = "Snowflake",
408+
Trino = "Trino",
345409
}
346410

347411
export enum EventType {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/*
2+
* Copyright 2026 Collate.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
* Unless required by applicable law or agreed to in writing, software
8+
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
* See the License for the specific language governing permissions and
11+
* limitations under the License.
12+
*/
13+
/**
14+
* Trino Connection Config
15+
*/
16+
export interface TrinoConnection {
17+
/**
18+
* Choose Auth Config Type.
19+
*/
20+
authType?: BasicAuth | NoConfigAuthenticationTypes;
21+
/**
22+
* Catalog of the data source.
23+
*/
24+
catalog?: string;
25+
connectionArguments?: { [key: string]: any };
26+
connectionOptions?: { [key: string]: string };
27+
/**
28+
* Database Schema of the data source.
29+
*/
30+
databaseSchema?: string;
31+
/**
32+
* Host and port of the Trino service.
33+
*/
34+
hostPort: string;
35+
/**
36+
* SQLAlchemy driver scheme options.
37+
*/
38+
scheme?: TrinoScheme;
39+
/**
40+
* Service Type
41+
*/
42+
type?: TrinoType;
43+
/**
44+
* Username to connect to Trino.
45+
*/
46+
username: string;
47+
}
48+
49+
/**
50+
* Common Database Connection Config
51+
*
52+
* Azure Database Connection Config
53+
*/
54+
export interface BasicAuth {
55+
/**
56+
* Password to connect to source.
57+
*/
58+
password?: string;
59+
/**
60+
* JWT to connect to source.
61+
*/
62+
jwt?: string;
63+
azureConfig?: AzureCredentials;
64+
}
65+
66+
/**
67+
* Azure Cloud Credentials
68+
*/
69+
export interface AzureCredentials {
70+
/**
71+
* Account Name of your storage account
72+
*/
73+
accountName?: string;
74+
/**
75+
* Your Service Principal App ID (Client ID)
76+
*/
77+
clientId?: string;
78+
/**
79+
* Your Service Principal Password (Client Secret)
80+
*/
81+
clientSecret?: string;
82+
/**
83+
* Scopes to get access token, for e.g. api://6dfX33ab-XXXX-49df-XXXX-3459eX817d3e/.default
84+
*/
85+
scopes?: string;
86+
/**
87+
* Tenant ID of your Azure Subscription
88+
*/
89+
tenantId?: string;
90+
/**
91+
* Key Vault Name
92+
*/
93+
vaultName?: string;
94+
}
95+
96+
/**
97+
* Database Authentication types not requiring config.
98+
*/
99+
export enum NoConfigAuthenticationTypes {
100+
OAuth2 = "OAuth2",
101+
}
102+
103+
/**
104+
* SQLAlchemy driver scheme options.
105+
*/
106+
export enum TrinoScheme {
107+
Trino = "trino",
108+
}
109+
110+
/**
111+
* Service Type
112+
*
113+
* Service type.
114+
*/
115+
export enum TrinoType {
116+
Trino = "Trino",
117+
}

openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface TestDefinition {
2727
/**
2828
* Description of the testcase.
2929
*/
30-
description: string;
30+
description?: string;
3131
/**
3232
* Display Name that identifies this test case.
3333
*/

0 commit comments

Comments
 (0)