From ff2a4fb7ccbc223215fbf9298fac23f32b5af396 Mon Sep 17 00:00:00 2001 From: Marimuthu Gurusamy Date: Mon, 7 Oct 2024 11:16:54 -0700 Subject: [PATCH] Adding Oracle CDP with relationships --- .../Tabular/CdpTableResolver.cs | 24 +- ....PowerFx.Connectors.Tests.Shared.projitems | 2 + .../PowerPlatformConnectorTests.cs | 71 + .../Oracle GetRelationships SampleDB.json | 28 + .../Swagger/Oracle.json | 2296 +++++++++++++++++ 5 files changed, 2420 insertions(+), 1 deletion(-) create mode 100644 src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Responses/Oracle GetRelationships SampleDB.json create mode 100644 src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Swagger/Oracle.json diff --git a/src/libraries/Microsoft.PowerFx.Connectors/Tabular/CdpTableResolver.cs b/src/libraries/Microsoft.PowerFx.Connectors/Tabular/CdpTableResolver.cs index 38ec594f67..0ebb668c9a 100644 --- a/src/libraries/Microsoft.PowerFx.Connectors/Tabular/CdpTableResolver.cs +++ b/src/libraries/Microsoft.PowerFx.Connectors/Tabular/CdpTableResolver.cs @@ -24,6 +24,11 @@ internal class CdpTableResolver : ICdpTableResolver private readonly bool _doubleEncoding; + private readonly JsonSerializerOptions _deserializationOptions = new () + { + PropertyNameCaseInsensitive = true + }; + // Temporary hack to generate ADS public bool GenerateADS { get; init; } @@ -83,6 +88,21 @@ public async Task ResolveTableAsync(string tableName, Cancel // Result should be cached sqlRelationships = GetSqlRelationships(text2); } + else if (IsOracle()) + { + cancellationToken.ThrowIfCancellationRequested(); + + uri = (_uriPrefix ?? string.Empty) + $"/datasets/{dataset}/query/oracle"; + string body = + @"{""query"":""SELECT TAB_CONS.CONSTRAINT_NAME AS FK_Name, '[' || TAB_CONS.OWNER || '].[' || TAB_CONS.TABLE_NAME || ']' AS Parent_Table, TAB_CONS_COLS.COLUMN_NAME AS Parent_Column, '[' || REF_CONS.OWNER || '].[' || REF_CONS.TABLE_NAME || ']' AS Referenced_Table, REF_CONS_COLS.COLUMN_NAME AS Referenced_Column" + + @" FROM ALL_CONSTRAINTS TAB_CONS" + + @" INNER JOIN ALL_CONS_COLUMNS TAB_CONS_COLS ON TAB_CONS.CONSTRAINT_NAME = TAB_CONS_COLS.CONSTRAINT_NAME AND TAB_CONS.OWNER = TAB_CONS_COLS.OWNER" + + @" INNER JOIN ALL_CONSTRAINTS REF_CONS ON TAB_CONS.R_CONSTRAINT_NAME = REF_CONS.CONSTRAINT_NAME" + + @" INNER JOIN ALL_CONS_COLUMNS REF_CONS_COLS ON REF_CONS.CONSTRAINT_NAME = REF_CONS_COLS.CONSTRAINT_NAME AND REF_CONS.OWNER = REF_CONS_COLS.OWNER" + + @" WHERE '[' || TAB_CONS.OWNER || '].[' || TAB_CONS.TABLE_NAME || ']' = '" + tableName + "'" + @"""}"; + + sqlRelationships = GetSqlRelationships(await CdpServiceBase.GetObject(_httpClient, $"Get Oracle relationships", uri, body, cancellationToken, Logger).ConfigureAwait(false)); + } string connectorName = _uriPrefix.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries)[1]; ConnectorType ct = ConnectorFunction.GetConnectorTypeAndTableCapabilities(this, connectorName, "Schema/Items", FormulaValue.New(text), sqlRelationships, ConnectorCompatibility.CdpCompatibility, _tabularTable.DatasetName, out string name, out string displayName, out ServiceCapabilities tableCapabilities); @@ -95,9 +115,11 @@ public async Task ResolveTableAsync(string tableName, Cancel private bool IsSql() => _uriPrefix.Contains("/sql/"); + private bool IsOracle() => _uriPrefix.Contains("/oracle/"); + private List GetSqlRelationships(string text) { - RelationshipResult r = JsonSerializer.Deserialize(text); + RelationshipResult r = JsonSerializer.Deserialize(text, _deserializationOptions); var relationships = r.ResultSets.Table1; if (relationships == null || relationships.Length == 0) diff --git a/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Microsoft.PowerFx.Connectors.Tests.Shared.projitems b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Microsoft.PowerFx.Connectors.Tests.Shared.projitems index dc0b202d51..18384cb704 100644 --- a/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Microsoft.PowerFx.Connectors.Tests.Shared.projitems +++ b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Microsoft.PowerFx.Connectors.Tests.Shared.projitems @@ -102,6 +102,7 @@ + @@ -293,6 +294,7 @@ + diff --git a/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/PowerPlatformConnectorTests.cs b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/PowerPlatformConnectorTests.cs index a49bfc57be..b16fc8b982 100644 --- a/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/PowerPlatformConnectorTests.cs +++ b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/PowerPlatformConnectorTests.cs @@ -1588,6 +1588,77 @@ public async Task SQL_ExecuteStoredProc_WithUserAgent() Assert.Equal(expected, actual); } + [Fact] + public async Task Oracle_GetRelationships() + { + using var testConnector = new LoggingTestServer(@"Swagger\Oracle.json", _output); + var apiDoc = testConnector._apiDocument; + var config = new PowerFxConfig(Features.PowerFxV1); + + using var httpClient = new HttpClient(testConnector); + string jwt = "eyJ0eXAiO..."; + using var client = new PowerPlatformConnectorClient("4d4a8e81-17a4-4a92-9bfe-8d12e607fb7f.08.common.tip1.azure-apihub.net", "4d4a8e81-17a4-4a92-9bfe-8d12e607fb7f", "53f515b50c3e4925803ec1f0945e799f", () => jwt, httpClient) { SessionId = "8e67ebdc-d402-455a-b33a-304820832383" }; + + config.AddActionConnector(new ConnectorSettings("Oracle") { IncludeInternalFunctions = true, AllowUnsupportedFunctions = true }, apiDoc, new ConsoleLogger(_output)); + RecalcEngine engine = new RecalcEngine(config); + RuntimeConfig rc = new RuntimeConfig().AddRuntimeContext(new TestConnectorRuntimeContext("Oracle", client, console: _output)); + + string query = + "SELECT TAB_CONS.CONSTRAINT_NAME AS FK_Name, '[' || TAB_CONS.OWNER || '].[' || TAB_CONS.TABLE_NAME || ']' AS Parent_Table, TAB_CONS_COLS.COLUMN_NAME AS Parent_Column, '[' || REF_CONS.OWNER || '].[' || REF_CONS.TABLE_NAME || ']' AS Referenced_Table, REF_CONS_COLS.COLUMN_NAME AS Referenced_Column" + + @" FROM ALL_CONSTRAINTS TAB_CONS" + + @" INNER JOIN ALL_CONS_COLUMNS TAB_CONS_COLS ON TAB_CONS.CONSTRAINT_NAME = TAB_CONS_COLS.CONSTRAINT_NAME AND TAB_CONS.OWNER = TAB_CONS_COLS.OWNER" + + @" INNER JOIN ALL_CONSTRAINTS REF_CONS ON TAB_CONS.R_CONSTRAINT_NAME = REF_CONS.CONSTRAINT_NAME" + + @" INNER JOIN ALL_CONS_COLUMNS REF_CONS_COLS ON REF_CONS.CONSTRAINT_NAME = REF_CONS_COLS.CONSTRAINT_NAME AND REF_CONS.OWNER = REF_CONS_COLS.OWNER" + + @" WHERE '[' || TAB_CONS.OWNER || '].[' || TAB_CONS.TABLE_NAME || ']' = '[HR].[EMPLOYEES]'"; + + testConnector.SetResponseFromFile(@"Responses\Oracle GetRelationships SampleDB.json"); + var result = await engine.EvalAsync(@$"Oracle.ExecutePassThroughNativeQuery({{ query: ""{query}"" }})", CancellationToken.None, new ParserOptions() { AllowsSideEffects = true }, runtimeConfig: rc); + + UntypedObjectValue uov = Assert.IsType(result); + JsonUntypedObject juo = Assert.IsType(uov.Impl); + JsonElement je = juo._element; + + RelationshipResult r = je.Deserialize(new JsonSerializerOptions() + { + PropertyNameCaseInsensitive = true + }); + var relationships = r.ResultSets.Table1; + + List sqlRelationShips = new List(); + + foreach (var fk in relationships) + { + sqlRelationShips.Add(new SqlRelationship() + { + RelationshipName = fk.FK_Name, + ParentTable = fk.Parent_Table, + ColumnName = fk.Parent_Column, + ReferencedTable = fk.Referenced_Table, + ReferencedColumnName = fk.Referenced_Column + }); + } + + Assert.Equal(3, sqlRelationShips.Count); + Assert.Equal("EMP_DEPT_FK, [HR].[EMPLOYEES], DEPARTMENT_ID, [HR].[DEPARTMENTS], DEPARTMENT_ID", sqlRelationShips[0].ToString()); + Assert.Equal("EMP_JOB_FK, [HR].[EMPLOYEES], JOB_ID, [HR].[JOBS], JOB_ID", sqlRelationShips[1].ToString()); + Assert.Equal("EMP_MANAGER_FK, [HR].[EMPLOYEES], MANAGER_ID, [HR].[EMPLOYEES], EMPLOYEE_ID", sqlRelationShips[2].ToString()); + + string expected = @$"POST https://4d4a8e81-17a4-4a92-9bfe-8d12e607fb7f.08.common.tip1.azure-apihub.net/invoke + authority: 4d4a8e81-17a4-4a92-9bfe-8d12e607fb7f.08.common.tip1.azure-apihub.net + Authorization: Bearer {jwt} + path: /invoke + scheme: https + x-ms-client-environment-id: /providers/Microsoft.PowerApps/environments/4d4a8e81-17a4-4a92-9bfe-8d12e607fb7f + x-ms-client-session-id: 8e67ebdc-d402-455a-b33a-304820832383 + x-ms-request-method: POST + x-ms-request-url: /apim/oracle/53f515b50c3e4925803ec1f0945e799f/datasets/default/query/oracle + x-ms-user-agent: PowerFx/{PowerPlatformConnectorClient.Version} + [content-header] Content-Type: application/json; charset=utf-8 + [body] {{""query"":""SELECT TAB_CONS.CONSTRAINT_NAME AS FK_Name, \u0027[\u0027 || TAB_CONS.OWNER || \u0027].[\u0027 || TAB_CONS.TABLE_NAME || \u0027]\u0027 AS Parent_Table, TAB_CONS_COLS.COLUMN_NAME AS Parent_Column, \u0027[\u0027 || REF_CONS.OWNER || \u0027].[\u0027 || REF_CONS.TABLE_NAME || \u0027]\u0027 AS Referenced_Table, REF_CONS_COLS.COLUMN_NAME AS Referenced_Column FROM ALL_CONSTRAINTS TAB_CONS INNER JOIN ALL_CONS_COLUMNS TAB_CONS_COLS ON TAB_CONS.CONSTRAINT_NAME = TAB_CONS_COLS.CONSTRAINT_NAME AND TAB_CONS.OWNER = TAB_CONS_COLS.OWNER INNER JOIN ALL_CONSTRAINTS REF_CONS ON TAB_CONS.R_CONSTRAINT_NAME = REF_CONS.CONSTRAINT_NAME INNER JOIN ALL_CONS_COLUMNS REF_CONS_COLS ON REF_CONS.CONSTRAINT_NAME = REF_CONS_COLS.CONSTRAINT_NAME AND REF_CONS.OWNER = REF_CONS_COLS.OWNER WHERE \u0027[\u0027 || TAB_CONS.OWNER || \u0027].[\u0027 || TAB_CONS.TABLE_NAME || \u0027]\u0027 = \u0027[HR].[EMPLOYEES]\u0027""}} +"; + Assert.Equal(expected, testConnector._log.ToString()); + } + private sealed class DateTimeNoTZ : BuiltinFunction, IAsyncTexlFunction5 { public override ArgPreprocessor GetArgPreprocessor(int index, int argCount) => base.GetGenericArgPreprocessor(index); diff --git a/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Responses/Oracle GetRelationships SampleDB.json b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Responses/Oracle GetRelationships SampleDB.json new file mode 100644 index 0000000000..dd7636dc2b --- /dev/null +++ b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Responses/Oracle GetRelationships SampleDB.json @@ -0,0 +1,28 @@ +{ + "OutputParameters": {}, + "ResultSets": { + "Table1": [ + { + "FK_NAME": "EMP_DEPT_FK", + "PARENT_TABLE": "[HR].[EMPLOYEES]", + "PARENT_COLUMN": "DEPARTMENT_ID", + "REFERENCED_TABLE": "[HR].[DEPARTMENTS]", + "REFERENCED_COLUMN": "DEPARTMENT_ID" + }, + { + "FK_NAME": "EMP_JOB_FK", + "PARENT_TABLE": "[HR].[EMPLOYEES]", + "PARENT_COLUMN": "JOB_ID", + "REFERENCED_TABLE": "[HR].[JOBS]", + "REFERENCED_COLUMN": "JOB_ID" + }, + { + "FK_NAME": "EMP_MANAGER_FK", + "PARENT_TABLE": "[HR].[EMPLOYEES]", + "PARENT_COLUMN": "MANAGER_ID", + "REFERENCED_TABLE": "[HR].[EMPLOYEES]", + "REFERENCED_COLUMN": "EMPLOYEE_ID" + } + ] + } +} \ No newline at end of file diff --git a/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Swagger/Oracle.json b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Swagger/Oracle.json new file mode 100644 index 0000000000..ac4320df09 --- /dev/null +++ b/src/tests/Microsoft.PowerFx.Connectors.Tests.Shared/Swagger/Oracle.json @@ -0,0 +1,2296 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Oracle Database", + "description": "Oracle Database is a relational database management system developed by Oracle. Connect to on-premise Oracle Database to perform various actions such as create, update, get, and delete on rows in a table.", + "x-ms-api-annotation": { + "status": "Production" + }, + "contact": { + "name": "Microsoft" + } + }, + "host": "localhost:27072", + "basePath": "/apim/oracle", + "schemes": [ + "https" + ], + "paths": { + "/{connectionId}/$metadata.json/datasets": { + "get": { + "tags": [ + "OracleDataSetsMetadata" + ], + "operationId": "GetDataSetsMetadata", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DataSetsMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/testconnection": { + "get": { + "tags": [ + "OracleDiagnostic" + ], + "operationId": "TestConnection", + "consumes": [], + "produces": [], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/$metadata.json/datasets/default/query/oracle": { + "post": { + "tags": [ + "OraclePassThroughNativeQueryMetadata" + ], + "summary": "Get pass-through native Oracle query metadata", + "description": "Retrieves metadata for a pass-through native Oracle query.", + "operationId": "GetPassThroughNativeQueryMetadata", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "query", + "in": "body", + "description": "query text.", + "required": true, + "schema": { + "$ref": "#/definitions/PassThroughNativeQueryBody" + }, + "x-ms-summary": "query text" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PassThroughNativeQueryMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/$metadata.json/datasets/default/procedures/{procedure}": { + "get": { + "tags": [ + "OracleProcedureMetadata" + ], + "summary": "Get procedure metadata", + "description": "This operation gets metadata for a stored procedure.", + "operationId": "GetProcedure", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "procedure", + "in": "path", + "description": "Name of stored procedure.", + "required": true, + "x-ms-summary": "Procedure name", + "x-ms-dynamic-values": { + "operationId": "GetProcedures", + "parameters": {}, + "value-path": "Name", + "value-title": "DisplayName" + }, + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProcedureMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/$metadata.json/datasets('{dataset}')/procedures('{procedure}')": { + "get": { + "tags": [ + "OracleProcedureMetadata" + ], + "summary": "Get procedure metadata", + "description": "This operation gets metadata for a stored procedure.", + "operationId": "ODataStyleGetProcedure", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "description": "Name of dataset.", + "required": true, + "x-ms-summary": "Dataset name", + "x-ms-url-encoding": "double", + "type": "string" + }, + { + "name": "procedure", + "in": "path", + "description": "Name of stored procedure.", + "required": true, + "x-ms-summary": "Procedure name", + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProcedureMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/$metadata.json/datasets/default/tables/{table}": { + "get": { + "tags": [ + "OracleTableMetadata" + ], + "summary": "Get table metadata", + "description": "This operation gets metadata for a table.", + "operationId": "GetTable", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "description": "Name of table.", + "required": true, + "x-ms-summary": "Table name", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TableMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/$metadata.json/datasets/default/tables/{table}/postitem": { + "get": { + "tags": [ + "OracleTableMetadata" + ], + "operationId": "GetMetadataForPostItem", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "required": true, + "x-ms-dynamic-values": { + "operationId": "GetTables", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TableMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/$metadata.json/datasets/default/tables/{table}/patchitem": { + "get": { + "tags": [ + "OracleTableMetadata" + ], + "operationId": "GetMetadataForPatchItem", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "required": true, + "x-ms-dynamic-values": { + "operationId": "GetTables", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TableMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/$metadata.json/datasets/default/tables/{table}/getitem": { + "get": { + "tags": [ + "OracleTableMetadata" + ], + "operationId": "GetMetadataForGetItem", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "required": true, + "x-ms-dynamic-values": { + "operationId": "GetTables", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TableMetadata" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets": { + "get": { + "tags": [ + "OracleDataSet" + ], + "summary": "Gets datasets", + "description": "This operation gets all datasets available to the connection.", + "operationId": "GetDataSets", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DataSetsList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets/default/procedures": { + "get": { + "tags": [ + "OracleProcedure" + ], + "summary": "Get stored procedures", + "description": "This operation gets stored procedures for a database.", + "operationId": "GetProcedures", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProceduresList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets({dataset})/procedures": { + "get": { + "tags": [ + "OracleProcedure" + ], + "summary": "Get stored procedures", + "description": "This operation gets stored procedures for a database.", + "operationId": "ODataStyleGetProcedures", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "required": true, + "x-ms-summary": "Dataset name", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProceduresList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets/default/procedures/{procedure}": { + "post": { + "tags": [ + "OracleProcedure" + ], + "summary": "Execute stored procedure", + "description": "This operation runs a stored procedure.", + "operationId": "ExecuteProcedure", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "procedure", + "in": "path", + "description": "Name of stored procedure", + "required": true, + "x-ms-summary": "Procedure name", + "x-ms-url-encoding": "double", + "x-ms-dynamic-values": { + "operationId": "GetProcedures", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "Input parameters to the stored procedure", + "required": true, + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "x-ms-dynamic-schema": { + "operationId": "GetProcedure", + "parameters": { + "procedure": { + "parameter": "procedure" + } + }, + "value-path": "Schema/InputParameters" + } + }, + "x-ms-summary": "Parameters list" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ProcedureResult" + }, + "x-ms-dynamic-schema": { + "operationId": "GetProcedure", + "parameters": { + "procedure": { + "parameter": "procedure" + } + }, + "value-path": "schema/procedureresultschema" + } + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "important" + } + }, + "/{connectionId}/datasets({dataset})/procedures({procedure})": { + "post": { + "tags": [ + "OracleProcedure" + ], + "summary": "Execute stored procedure", + "description": "This operation runs a stored procedure.", + "operationId": "ODataStyleExecuteProcedure", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "description": "Name of dataset", + "required": true, + "x-ms-summary": "DataSet name", + "type": "string" + }, + { + "name": "procedure", + "in": "path", + "description": "Name of stored procedure", + "required": true, + "x-ms-summary": "Procedure name", + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "Input parameters to the stored procedure", + "required": true, + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + } + }, + "x-ms-summary": "Parameters list" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProcedureResult" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets/default/tablesfor": { + "get": { + "tags": [ + "OracleTable" + ], + "summary": "GetTables with OData paging and filtering", + "description": "GetTables with OData paging and filtering", + "operationId": "GetFilteredTables", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "$filter", + "in": "query", + "description": "An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123).", + "required": false, + "x-ms-summary": "Filter Query", + "x-ms-visibility": "advanced", + "type": "string" + }, + { + "name": "$orderby", + "in": "query", + "description": "An ODATA orderBy query for specifying the order of entries.", + "required": false, + "x-ms-summary": "Order By", + "x-ms-visibility": "advanced", + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Total number of entries to retrieve (default = all).", + "required": false, + "x-ms-summary": "Top Count", + "x-ms-visibility": "advanced", + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of entries to skip (default = 0).", + "required": false, + "x-ms-summary": "Skip Count", + "x-ms-visibility": "advanced", + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TablesList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + } + }, + "/{connectionId}/datasets/default/tablesfor/getitem": { + "get": { + "tags": [ + "OracleTable" + ], + "summary": "GetTablesForGetItem", + "description": "GetTablesForGetItem", + "operationId": "GetTablesForGetItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TablesList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + } + }, + "/{connectionId}/datasets/default/tablesfor/postitem": { + "get": { + "tags": [ + "OracleTable" + ], + "summary": "GetTablesForPostItem", + "description": "GetTablesForPostItem", + "operationId": "GetTablesForPostItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TablesList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + } + }, + "/{connectionId}/datasets/default/tablesfor/patchitem": { + "get": { + "tags": [ + "OracleTable" + ], + "summary": "GetTablesForPatchItem", + "description": "GetTablesForPatchItem", + "operationId": "GetTablesForPatchItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TablesList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + } + }, + "/{connectionId}/datasets/default/tablesfor/deleteitem": { + "get": { + "tags": [ + "OracleTable" + ], + "summary": "GetTablesForDeleteItem", + "description": "GetTablesForDeleteItem", + "operationId": "GetTablesForDeleteItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TablesList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + } + }, + "/{connectionId}/datasets/default/tables": { + "get": { + "tags": [ + "OracleTable" + ], + "summary": "Get tables", + "description": "This operation gets tables from a database.", + "operationId": "GetTables", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TablesList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "advanced", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + } + }, + "/{connectionId}/datasets({dataset})/tables": { + "get": { + "tags": [ + "OracleTable" + ], + "operationId": "ODataStyleGetTables", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/TablesList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets/default/tables/{table}/items": { + "get": { + "tags": [ + "OracleTableData" + ], + "summary": "Get rows", + "description": "This operation gets rows from a table.", + "operationId": "GetItems", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "description": "Name of Oracle table", + "required": true, + "x-ms-summary": "Table name", + "x-ms-url-encoding": "double", + "x-ms-dynamic-values": { + "operationId": "GetTables", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123).", + "required": false, + "x-ms-summary": "Filter Query", + "x-ms-visibility": "advanced", + "type": "string" + }, + { + "name": "$orderby", + "in": "query", + "description": "An ODATA orderBy query for specifying the order of entries.", + "required": false, + "x-ms-summary": "Order By", + "x-ms-visibility": "advanced", + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Total number of entries to retrieve (default = all).", + "required": false, + "x-ms-summary": "Top Count", + "x-ms-visibility": "advanced", + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of entries to skip (default = 0).", + "required": false, + "x-ms-summary": "Skip Count", + "x-ms-visibility": "advanced", + "type": "integer", + "format": "int32" + }, + { + "name": "$select", + "in": "query", + "description": "Specific fields to retrieve from entries (default = all).", + "required": false, + "x-ms-summary": "Select Query", + "x-ms-visibility": "advanced", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ItemsList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "important", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + }, + "post": { + "tags": [ + "OracleTableData" + ], + "summary": "Insert row", + "description": "This operation inserts a new row into a table.", + "operationId": "PostItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "x-ms-url-encoding": "double", + "x-ms-dynamic-values": { + "operationId": "GetTablesForPostItem", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "type": "string" + }, + { + "name": "item", + "in": "body", + "description": "Row to insert into the specified table", + "required": true, + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Item" + }, + "x-ms-dynamic-schema": { + "operationId": "GetTable", + "parameters": { + "table": { + "parameter": "table" + } + }, + "value-path": "Schema/Items" + } + }, + "x-ms-summary": "Row" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Item" + }, + "x-ms-dynamic-schema": { + "operationId": "GetTable", + "parameters": { + "table": { + "parameter": "table" + } + }, + "value-path": "Schema/Items" + } + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "important" + } + }, + "/{connectionId}/datasets/default/tables/{table}/items/{id}": { + "get": { + "tags": [ + "OracleTableData" + ], + "summary": "Get row", + "description": "This operation gets a row from a table.", + "operationId": "GetItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "description": "Name of Oracle table", + "required": true, + "x-ms-summary": "Table name", + "x-ms-url-encoding": "double", + "x-ms-dynamic-values": { + "operationId": "GetTablesForGetItem", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "type": "string" + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the row to retrieve", + "required": true, + "x-ms-summary": "Row id", + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Item" + }, + "x-ms-dynamic-schema": { + "operationId": "GetTable", + "parameters": { + "table": { + "parameter": "table" + } + }, + "value-path": "Schema/Items" + } + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "important" + }, + "delete": { + "tags": [ + "OracleTableData" + ], + "summary": "Delete row", + "description": "This operation deletes a row from a table.", + "operationId": "DeleteItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "x-ms-url-encoding": "double", + "x-ms-dynamic-values": { + "operationId": "GetTablesForDeleteItem", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "type": "string" + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the row to delete", + "required": true, + "x-ms-summary": "Row id", + "x-ms-url-encoding": "double", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false + }, + "patch": { + "tags": [ + "OracleTableData" + ], + "summary": "Update row", + "description": "This operation updates an existing row in a table.", + "operationId": "PatchItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "x-ms-url-encoding": "double", + "x-ms-dynamic-values": { + "operationId": "GetTablesForPatchItem", + "parameters": {}, + "value-collection": "value", + "value-path": "Name", + "value-title": "DisplayName" + }, + "type": "string" + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the row to update", + "required": true, + "x-ms-summary": "Row id", + "x-ms-url-encoding": "double", + "type": "string" + }, + { + "name": "item", + "in": "body", + "description": "Row with updated values", + "required": true, + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Item" + }, + "x-ms-dynamic-schema": { + "operationId": "GetTable", + "parameters": { + "table": { + "parameter": "table" + } + }, + "value-path": "Schema/Items" + } + }, + "x-ms-summary": "Row" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Item" + }, + "x-ms-dynamic-schema": { + "operationId": "GetTable", + "parameters": { + "table": { + "parameter": "table" + } + }, + "value-path": "Schema/Items" + } + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false + } + }, + "/{connectionId}/datasets({dataset})/tables({table})/items": { + "get": { + "tags": [ + "OracleTableData" + ], + "summary": "Get rows", + "description": "This operation gets rows from a table.", + "operationId": "ODataStyleGetItems", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "description": "Name of dataset", + "required": true, + "x-ms-summary": "Dataset name", + "type": "string" + }, + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123).", + "required": false, + "x-ms-summary": "Filter Query", + "x-ms-visibility": "advanced", + "type": "string" + }, + { + "name": "$orderby", + "in": "query", + "description": "An ODATA orderBy query for specifying the order of entries.", + "required": false, + "x-ms-summary": "Order By", + "x-ms-visibility": "advanced", + "type": "string" + }, + { + "name": "$top", + "in": "query", + "description": "Total number of entries to retrieve (default = all).", + "required": false, + "x-ms-summary": "Top Count", + "x-ms-visibility": "advanced", + "type": "integer", + "format": "int32" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of entries to skip (default = 0).", + "required": false, + "x-ms-summary": "Skip Count", + "x-ms-visibility": "advanced", + "type": "integer", + "format": "int32" + }, + { + "name": "$select", + "in": "query", + "description": "Specific fields to retrieve from entries (default = all).", + "required": false, + "x-ms-summary": "Select Query", + "x-ms-visibility": "advanced", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ItemsList" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal", + "x-ms-pageable": { + "nextLinkName": "@odata.nextLink" + } + }, + "post": { + "tags": [ + "OracleTableData" + ], + "summary": "Insert row", + "description": "This operation inserts a new row into a table.", + "operationId": "ODataStylePostItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "description": "Name of dataset", + "required": true, + "x-ms-summary": "Dataset name", + "type": "string" + }, + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "type": "string" + }, + { + "name": "item", + "in": "body", + "description": "Row to insert into the specified table", + "required": true, + "schema": { + "$ref": "#/definitions/Item" + }, + "x-ms-summary": "Row" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Item" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets({dataset})/tables({table})/items({id})": { + "get": { + "tags": [ + "OracleTableData" + ], + "summary": "Get row", + "description": "This operation gets a row from a table.", + "operationId": "ODataStyleGetItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "description": "Name of dataset", + "required": true, + "x-ms-summary": "Dataset name", + "type": "string" + }, + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "type": "string" + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the row to retrieve", + "required": true, + "x-ms-summary": "Row id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Item" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + }, + "delete": { + "tags": [ + "OracleTableData" + ], + "summary": "Delete row", + "description": "This operation deletes a row from a table.", + "operationId": "ODataStyleDeleteItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "description": "Name of dataset", + "required": true, + "x-ms-summary": "Dataset name", + "type": "string" + }, + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "type": "string" + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the row to delete", + "required": true, + "x-ms-summary": "Row id", + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + }, + "patch": { + "tags": [ + "OracleTableData" + ], + "summary": "Update row", + "description": "This operation updates an existing row in a table.", + "operationId": "ODataStylePatchItem", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "description": "Name of dataset", + "required": true, + "x-ms-summary": "Dataset name", + "type": "string" + }, + { + "name": "table", + "in": "path", + "description": "Name of table", + "required": true, + "x-ms-summary": "Table name", + "type": "string" + }, + { + "name": "id", + "in": "path", + "description": "Unique identifier of the row to update", + "required": true, + "x-ms-summary": "Row id", + "type": "string" + }, + { + "name": "item", + "in": "body", + "description": "Row with updated values", + "required": true, + "schema": { + "$ref": "#/definitions/Item" + }, + "x-ms-summary": "Row" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Item" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + }, + "/{connectionId}/datasets/default/query/oracle": { + "post": { + "tags": [ + "OraclePassThroughNativeQuery" + ], + "summary": "Execute a Oracle query", + "description": "Execute a Oracle query", + "operationId": "ExecutePassThroughNativeQuery", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "query", + "in": "body", + "description": "query body", + "required": true, + "schema": { + "$ref": "#/definitions/PassThroughNativeQueryBody" + }, + "x-ms-summary": "Query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/PassThroughNativeQueryResult" + }, + "x-ms-dynamic-schema": { + "operationId": "GetPassThroughNativeQueryMetadata", + "parameters": { + "formalParameters": { + "parameter": "formalParameters" + }, + "query": { + "parameter": "query" + } + }, + "value-path": "schema/queryresults" + }, + "x-ms-dynamic-properties": { + "operationId": "GetPassThroughNativeQueryMetadata", + "parameters": { + "query/formalParameters": { + "parameterReference": "query/formalParameters" + }, + "query/query": { + "parameterReference": "query/query" + } + }, + "itemValuePath": "schema/queryresults" + } + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "important", + "x-ms-api-annotation": { + "status": "Production", + "family": "ExecutePassThroughNativeQuery", + "revision": 1 + } + } + }, + "/{connectionId}/datasets({dataset})/query({language})": { + "post": { + "tags": [ + "OraclePassThroughNativeQuery" + ], + "operationId": "ODataStyleExecutePassThroughNativeQuery", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "dataset", + "in": "path", + "required": true, + "x-ms-summary": "Dataset name", + "type": "string" + }, + { + "name": "language", + "in": "path", + "required": true, + "x-ms-visibility": "internal", + "type": "string" + }, + { + "name": "query", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PassThroughNativeQueryBody" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PassThroughNativeQueryResult" + } + }, + "default": { + "description": "Operation Failed." + } + }, + "deprecated": false, + "x-ms-visibility": "internal" + } + } + }, + "definitions": { + "DataSetsMetadata": { + "description": "Dataset metadata", + "type": "object", + "properties": { + "tabular": { + "$ref": "#/definitions/TabularDataSetsMetadata" + }, + "blob": { + "$ref": "#/definitions/BlobDataSetsMetadata" + } + } + }, + "TabularDataSetsMetadata": { + "description": "Tabular dataset metadata", + "type": "object", + "properties": { + "source": { + "description": "Dataset source", + "type": "string" + }, + "displayName": { + "description": "Dataset display name", + "type": "string" + }, + "urlEncoding": { + "description": "Dataset url encoding", + "type": "string" + }, + "tableDisplayName": { + "description": "Table display name", + "type": "string" + }, + "tablePluralName": { + "description": "Table plural display name", + "type": "string" + } + } + }, + "BlobDataSetsMetadata": { + "description": "Blob dataset metadata", + "type": "object", + "properties": { + "source": { + "description": "Blob dataset source", + "type": "string" + }, + "displayName": { + "description": "Blob dataset display name", + "type": "string" + }, + "urlEncoding": { + "description": "Blob dataset url encoding", + "type": "string" + } + } + }, + "PassThroughNativeQueryBody": { + "description": "Input body to execute Pass-through Native Query (PNQ)", + "type": "object", + "properties": { + "query": { + "description": "Query Text", + "type": "string" + }, + "formalParameters": { + "description": "Formal Parameters", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-editor": "dictionary" + }, + "actualParameters": { + "description": "Actual parameters", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "x-ms-dynamic-schema": { + "operationId": "GetPassThroughNativeQueryMetadata", + "parameters": { + "formalParameters": { + "parameter": "formalParameters" + } + }, + "value-path": "schema/actualparameters" + }, + "x-ms-dynamic-properties": { + "operationId": "GetPassThroughNativeQueryMetadata", + "parameters": { + "query/formalParameters": { + "parameterReference": "query/formalParameters" + } + }, + "itemValuePath": "schema/actualparameters" + } + } + } + }, + "Object": { + "type": "object", + "properties": {} + }, + "PassThroughNativeQueryMetadata": { + "description": "Represents the metadata for a pass-through native query", + "type": "object", + "properties": { + "name": { + "description": "Query name", + "type": "string" + }, + "title": { + "description": "Query title", + "type": "string" + }, + "schema": { + "$ref": "#/definitions/Object" + } + } + }, + "ProcedureMetadata": { + "description": "Procedure metadata", + "type": "object", + "properties": { + "name": { + "description": "Procedure name", + "type": "string" + }, + "title": { + "description": "Procedure title", + "type": "string" + }, + "schema": { + "$ref": "#/definitions/Object" + } + } + }, + "TableMetadata": { + "description": "Table metadata", + "type": "object", + "properties": { + "name": { + "description": "Table name", + "type": "string" + }, + "title": { + "description": "Table title", + "type": "string" + }, + "x-ms-permission": { + "description": "Table permission", + "type": "string" + }, + "x-ms-capabilities": { + "$ref": "#/definitions/TableCapabilitiesMetadata" + }, + "schema": { + "$ref": "#/definitions/Object" + }, + "referencedEntities": { + "$ref": "#/definitions/Object" + }, + "webUrl": { + "description": "Url link", + "type": "string" + } + } + }, + "TableCapabilitiesMetadata": { + "description": "Metadata for a table (capabilities)", + "type": "object", + "properties": { + "sortRestrictions": { + "$ref": "#/definitions/TableSortRestrictionsMetadata" + }, + "filterRestrictions": { + "$ref": "#/definitions/TableFilterRestrictionsMetadata" + }, + "selectRestrictions": { + "$ref": "#/definitions/TableSelectRestrictionsMetadata" + }, + "isOnlyServerPagable": { + "description": "Server paging restrictions", + "type": "boolean" + }, + "filterFunctionSupport": { + "description": "List of supported filter capabilities", + "type": "array", + "items": { + "enum": [ + "eq", + "ne", + "gt", + "ge", + "lt", + "le", + "and", + "or", + "contains", + "startswith", + "endswith", + "length", + "indexof", + "replace", + "substring", + "substringof", + "tolower", + "toupper", + "trim", + "concat", + "year", + "month", + "day", + "hour", + "minute", + "second", + "date", + "time", + "now", + "totaloffsetminutes", + "totalseconds", + "floor", + "ceiling", + "round", + "not", + "negate", + "add", + "sub", + "mul", + "div", + "mod", + "sum", + "min", + "max", + "average", + "countdistinct", + "null" + ], + "type": "string" + } + }, + "serverPagingOptions": { + "description": "List of supported server-driven paging capabilities", + "type": "array", + "items": { + "enum": [ + "top", + "skiptoken" + ], + "type": "string" + } + } + } + }, + "TableSortRestrictionsMetadata": { + "description": "Metadata for a table (sort restrictions)", + "type": "object", + "properties": { + "sortable": { + "description": "Indicates whether this table has sortable columns", + "type": "boolean" + }, + "unsortableProperties": { + "description": "List of unsortable properties", + "type": "array", + "items": { + "type": "string" + } + }, + "ascendingOnlyProperties": { + "description": "List of properties which support ascending order only", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "TableFilterRestrictionsMetadata": { + "description": "Metadata for a table (filter restrictions)", + "type": "object", + "properties": { + "filterable": { + "description": "Indicates whether this table has filterable columns", + "type": "boolean" + }, + "nonFilterableProperties": { + "description": "List of non filterable properties", + "type": "array", + "items": { + "type": "string" + } + }, + "requiredProperties": { + "description": "List of required properties", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "TableSelectRestrictionsMetadata": { + "description": "Metadata for a table (select restrictions)", + "type": "object", + "properties": { + "selectable": { + "description": "Indicates whether this table has selectable columns", + "type": "boolean" + } + } + }, + "DataSetsList": { + "description": "List of datasets", + "type": "object", + "properties": { + "value": { + "description": "List of datasets", + "type": "array", + "items": { + "$ref": "#/definitions/DataSet" + } + } + } + }, + "DataSet": { + "description": "Dataset", + "type": "object", + "properties": { + "Name": { + "description": "Dataset name", + "type": "string" + }, + "DisplayName": { + "description": "Dataset display name", + "type": "string" + }, + "query": { + "description": "Pass-through Native Queries", + "type": "array", + "items": { + "$ref": "#/definitions/PassThroughNativeQuery" + }, + "readOnly": true + } + } + }, + "Table": { + "description": "Represents a table.", + "type": "object", + "properties": { + "Name": { + "description": "The name of the table. The name is used at runtime.", + "type": "string" + }, + "DisplayName": { + "description": "The display name of the table.", + "type": "string" + }, + "DynamicProperties": { + "description": "Additional table properties provided by the connector to the clients.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "readOnly": true + } + } + }, + "Procedure": { + "description": "Procedure", + "type": "object", + "properties": { + "Name": { + "description": "Procedure name", + "type": "string" + }, + "DisplayName": { + "description": "Procedure display name", + "type": "string" + } + } + }, + "PassThroughNativeQuery": { + "description": "static schema for pass-through native query execution", + "type": "object", + "properties": { + "Language": { + "description": "Query language", + "type": "string" + } + } + }, + "Item": { + "description": "Table item entity", + "type": "object", + "properties": { + "dynamicProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + } + } + }, + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "x-ms-dynamic-schema": { + "operationId": "GetTable", + "parameters": { + "table": { + "parameter": "table" + } + }, + "value-path": "Schema/Items" + } + }, + "ProceduresList": { + "description": "Represents a list of procedures.", + "type": "object", + "properties": { + "value": { + "description": "List of Procedures", + "type": "array", + "items": { + "$ref": "#/definitions/Procedure" + } + } + } + }, + "ProcedureResult": { + "description": "Result of a procedure execution.", + "type": "object", + "properties": { + "OutputParameters": { + "description": "Output parameter values. The schema is dynamic based on the procedure.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "readOnly": true + }, + "ReturnCode": { + "format": "int32", + "description": "Return code of a procedure.", + "type": "integer" + }, + "ResultSets": { + "description": "Result sets returned by a procedure. The schema is dynamic based on the procedure.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + } + } + }, + "readOnly": true + } + }, + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "x-ms-dynamic-schema": { + "operationId": "GetProcedure", + "parameters": { + "procedure": { + "parameter": "procedure" + } + }, + "value-path": "schema/procedureresultschema" + } + }, + "TablesList": { + "description": "Represents a list of tables.", + "type": "object", + "properties": { + "value": { + "description": "List of Tables", + "type": "array", + "items": { + "$ref": "#/definitions/Table" + } + } + } + }, + "ItemsList": { + "description": "List of Items", + "type": "object", + "properties": { + "value": { + "description": "List of Items", + "type": "array", + "items": { + "$ref": "#/definitions/Item" + } + } + } + }, + "PassThroughNativeQueryResult": { + "description": "All results of the query", + "type": "object", + "properties": { + "OutputParameters": { + "description": "Output parameter values", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "readOnly": true + }, + "ResultSets": { + "description": "Collection of all result sets", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Object" + } + } + }, + "readOnly": true + } + }, + "additionalProperties": { + "$ref": "#/definitions/Object" + }, + "x-ms-dynamic-schema": { + "operationId": "GetPassThroughNativeQueryMetadata", + "parameters": { + "query": { + "parameter": "query" + } + }, + "value-path": "schema/queryresults" + }, + "x-ms-dynamic-properties": { + "operationId": "GetPassThroughNativeQueryMetadata", + "parameters": { + "query/query": { + "parameterReference": "query/query" + } + }, + "itemValuePath": "schema/queryresults" + } + } + }, + "x-ms-capabilities": { + "testConnection": { + "operationId": "TestConnection", + "parameters": {} + } + }, + "x-ms-connector-metadata": [ + { + "propertyName": "Website", + "propertyValue": "https://www.oracle.com/database/" + }, + { + "propertyName": "Privacy policy", + "propertyValue": "https://www.oracle.com/legal/privacy/" + } + ] +} \ No newline at end of file