diff --git a/common/types/data_connections.ts b/common/types/data_connections.ts
index ba13c2eb7..be1f663c3 100644
--- a/common/types/data_connections.ts
+++ b/common/types/data_connections.ts
@@ -5,6 +5,8 @@
import { EuiComboBoxOptionOption } from '@elastic/eui';
+export type AccelerationStatus = 'ACTIVE' | 'INACTIVE';
+
export interface PermissionsConfigurationProps {
roles: Role[];
selectedRoles: Role[];
@@ -13,13 +15,33 @@ export interface PermissionsConfigurationProps {
hasSecurityAccess: boolean;
}
+export interface TableColumn {
+ name: string;
+ dataType: string;
+}
+
+export interface Acceleration {
+ name: string;
+ status: AccelerationStatus;
+ type: string;
+ database: string;
+ table: string;
+ destination: string;
+ dateCreated: number;
+ dateUpdated: number;
+ index: string;
+ sql: string;
+}
+
export interface AssociatedObject {
+ datasource: string;
id: string;
name: string;
database: string;
type: string;
createdByIntegration: string;
- accelerations: string[];
+ accelerations: Acceleration[];
+ columns: TableColumn[];
}
export type Role = EuiComboBoxOptionOption;
diff --git a/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap b/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap
index a973ea0ca..c687978d5 100644
--- a/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap
+++ b/public/components/datasources/components/__tests__/__snapshots__/associated_objects_tab.test.tsx.snap
@@ -6,72 +6,216 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
Array [
Object {
"accelerations": Array [
- "skipping_index_1",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_1",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ Object {
+ "dataType": "dataType3",
+ "name": "column3",
+ },
+ Object {
+ "dataType": "dataType4",
+ "name": "column4",
+ },
+ ],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "1",
"name": "Table_name_1",
"type": "Table",
},
Object {
"accelerations": Array [
- "skipping_index_1",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "2",
"name": "Table_name_2",
"type": "Table",
},
Object {
"accelerations": Array [
- "skipping_index_2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "3",
- "name": "Table_name_3",
- "type": "Table",
+ "name": "skipping_index_2",
+ "type": "Skip Index",
},
Object {
"accelerations": Array [
- "skipping_index_2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ ],
+ "createdByIntegration": "integration_1",
"database": "db2",
+ "datasource": "flint_s3",
"id": "4",
"name": "Table_name_4",
"type": "Table",
},
Object {
- "accelerations": Array [
- "skipping_index_3",
+ "accelerations": Array [],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
],
- "createdByIntegration": "xx",
+ "createdByIntegration": "integration_1",
"database": "db3",
+ "datasource": "flint_s3",
"id": "5",
"name": "Table_name_5",
"type": "Table",
},
Object {
- "accelerations": Array [],
+ "accelerations": Array [
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "covering_index_3",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ ],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ ],
"createdByIntegration": "",
"database": "db3",
+ "datasource": "flint_s3",
"id": "6",
- "name": "Table_name_5",
- "type": "CI",
+ "name": "covering_index_3",
+ "type": "Cover Index",
},
Object {
"accelerations": Array [
- "acc1",
- "acc2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_4",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_5",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ ],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
],
"createdByIntegration": "",
"database": "db3",
- "id": "6",
- "name": "Table_name_5",
- "type": "CI",
+ "datasource": "flint_s3",
+ "id": "7",
+ "name": "Table_name_6",
+ "type": "Table",
},
]
}
@@ -403,72 +547,216 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
Array [
Object {
"accelerations": Array [
- "skipping_index_1",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_1",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ Object {
+ "dataType": "dataType3",
+ "name": "column3",
+ },
+ Object {
+ "dataType": "dataType4",
+ "name": "column4",
+ },
+ ],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "1",
"name": "Table_name_1",
"type": "Table",
},
Object {
"accelerations": Array [
- "skipping_index_1",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "2",
"name": "Table_name_2",
"type": "Table",
},
Object {
"accelerations": Array [
- "skipping_index_2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "3",
- "name": "Table_name_3",
- "type": "Table",
+ "name": "skipping_index_2",
+ "type": "Skip Index",
},
Object {
"accelerations": Array [
- "skipping_index_2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ ],
+ "createdByIntegration": "integration_1",
"database": "db2",
+ "datasource": "flint_s3",
"id": "4",
"name": "Table_name_4",
"type": "Table",
},
Object {
- "accelerations": Array [
- "skipping_index_3",
+ "accelerations": Array [],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
],
- "createdByIntegration": "xx",
+ "createdByIntegration": "integration_1",
"database": "db3",
+ "datasource": "flint_s3",
"id": "5",
"name": "Table_name_5",
"type": "Table",
},
Object {
- "accelerations": Array [],
+ "accelerations": Array [
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "covering_index_3",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ ],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ ],
"createdByIntegration": "",
"database": "db3",
+ "datasource": "flint_s3",
"id": "6",
- "name": "Table_name_5",
- "type": "CI",
+ "name": "covering_index_3",
+ "type": "Cover Index",
},
Object {
"accelerations": Array [
- "acc1",
- "acc2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_4",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_5",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ ],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
],
"createdByIntegration": "",
"database": "db3",
- "id": "6",
- "name": "Table_name_5",
- "type": "CI",
+ "datasource": "flint_s3",
+ "id": "7",
+ "name": "Table_name_6",
+ "type": "Table",
},
]
}
@@ -528,12 +816,8 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"name": "Accelerations",
"options": Array [
Object {
- "text": "acc1",
- "value": "acc1",
- },
- Object {
- "text": "acc2",
- "value": "acc2",
+ "text": "covering_index_3",
+ "value": "covering_index_3",
},
Object {
"text": "skipping_index_1",
@@ -544,8 +828,12 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"value": "skipping_index_2",
},
Object {
- "text": "skipping_index_3",
- "value": "skipping_index_3",
+ "text": "skipping_index_4",
+ "value": "skipping_index_4",
+ },
+ Object {
+ "text": "skipping_index_5",
+ "value": "skipping_index_5",
},
],
"type": "field_value_selection",
@@ -612,12 +900,8 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"name": "Accelerations",
"options": Array [
Object {
- "text": "acc1",
- "value": "acc1",
- },
- Object {
- "text": "acc2",
- "value": "acc2",
+ "text": "covering_index_3",
+ "value": "covering_index_3",
},
Object {
"text": "skipping_index_1",
@@ -628,8 +912,12 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"value": "skipping_index_2",
},
Object {
- "text": "skipping_index_3",
- "value": "skipping_index_3",
+ "text": "skipping_index_4",
+ "value": "skipping_index_4",
+ },
+ Object {
+ "text": "skipping_index_5",
+ "value": "skipping_index_5",
},
],
"type": "field_value_selection",
@@ -791,12 +1079,8 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"name": "Accelerations",
"options": Array [
Object {
- "text": "acc1",
- "value": "acc1",
- },
- Object {
- "text": "acc2",
- "value": "acc2",
+ "text": "covering_index_3",
+ "value": "covering_index_3",
},
Object {
"text": "skipping_index_1",
@@ -807,8 +1091,12 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"value": "skipping_index_2",
},
Object {
- "text": "skipping_index_3",
- "value": "skipping_index_3",
+ "text": "skipping_index_4",
+ "value": "skipping_index_4",
+ },
+ Object {
+ "text": "skipping_index_5",
+ "value": "skipping_index_5",
},
],
"type": "field_value_selection",
@@ -1014,12 +1302,8 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"name": "Accelerations",
"options": Array [
Object {
- "text": "acc1",
- "value": "acc1",
- },
- Object {
- "text": "acc2",
- "value": "acc2",
+ "text": "covering_index_3",
+ "value": "covering_index_3",
},
Object {
"text": "skipping_index_1",
@@ -1030,8 +1314,12 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
"value": "skipping_index_2",
},
Object {
- "text": "skipping_index_3",
- "value": "skipping_index_3",
+ "text": "skipping_index_4",
+ "value": "skipping_index_4",
+ },
+ Object {
+ "text": "skipping_index_5",
+ "value": "skipping_index_5",
},
],
"type": "field_value_selection",
@@ -1252,72 +1540,216 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
Array [
Object {
"accelerations": Array [
- "skipping_index_1",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_1",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ Object {
+ "dataType": "dataType3",
+ "name": "column3",
+ },
+ Object {
+ "dataType": "dataType4",
+ "name": "column4",
+ },
+ ],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "1",
"name": "Table_name_1",
"type": "Table",
},
Object {
"accelerations": Array [
- "skipping_index_1",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
+ "columns": Array [],
+ "createdByIntegration": "integration_1",
"database": "db1",
+ "datasource": "flint_s3",
"id": "2",
"name": "Table_name_2",
"type": "Table",
},
Object {
"accelerations": Array [
- "skipping_index_2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
],
- "createdByIntegration": "xx",
- "database": "db1",
- "id": "3",
- "name": "Table_name_3",
- "type": "Table",
- },
- Object {
- "accelerations": Array [
- "skipping_index_2",
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
],
- "createdByIntegration": "xx",
+ "createdByIntegration": "integration_1",
"database": "db2",
+ "datasource": "flint_s3",
"id": "4",
"name": "Table_name_4",
"type": "Table",
},
Object {
- "accelerations": Array [
- "skipping_index_3",
+ "accelerations": Array [],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
],
- "createdByIntegration": "xx",
+ "createdByIntegration": "integration_1",
"database": "db3",
+ "datasource": "flint_s3",
"id": "5",
"name": "Table_name_5",
"type": "Table",
},
Object {
- "accelerations": Array [],
+ "accelerations": Array [
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_4",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_5",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ ],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
+ ],
"createdByIntegration": "",
"database": "db3",
- "id": "6",
- "name": "Table_name_5",
- "type": "CI",
+ "datasource": "flint_s3",
+ "id": "7",
+ "name": "Table_name_6",
+ "type": "Table",
},
Object {
"accelerations": Array [
- "acc1",
- "acc2",
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "covering_index_3",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ ],
+ "columns": Array [
+ Object {
+ "dataType": "dataType1",
+ "name": "column1",
+ },
+ Object {
+ "dataType": "dataType2",
+ "name": "column2",
+ },
],
"createdByIntegration": "",
"database": "db3",
+ "datasource": "flint_s3",
"id": "6",
- "name": "Table_name_5",
- "type": "CI",
+ "name": "covering_index_3",
+ "type": "Cover Index",
+ },
+ Object {
+ "accelerations": Array [
+ Object {
+ "database": "db1",
+ "dateCreated": 1709339290,
+ "dateUpdated": 1709339290,
+ "destination": "N/A",
+ "index": "security_logs_2022",
+ "name": "skipping_index_2",
+ "sql": "SELECT * FROM Table_name_1 WHERE ...",
+ "status": "ACTIVE",
+ "table": "Table_name_1",
+ "type": "skip",
+ },
+ ],
+ "columns": Array [],
+ "createdByIntegration": "integration_1",
+ "database": "db1",
+ "datasource": "flint_s3",
+ "id": "3",
+ "name": "skipping_index_2",
+ "type": "Skip Index",
},
]
}
@@ -1966,16 +2398,17 @@ exports[`AssociatedObjectsTab Component renders correctly with associated object
>
+ {i18n.translate('datasources.associatedObjectsFlyout.noAccelerationDescription', { + defaultMessage: ACCE_NO_DATA_DESCRIPTION, + })} +
+ } + actions={ +