Skip to content

Commit 729c26a

Browse files
authored
Merge pull request #532 from cloudsufi/fem/oracledb
[PLUGIN-1835] Add OracleErrorDetailsProvider
2 parents 10c7548 + 96702fd commit 729c26a

File tree

5 files changed

+53
-0
lines changed

5 files changed

+53
-0
lines changed

database-commons/src/main/java/io/cdap/plugin/util/DBUtils.java

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public final class DBUtils {
6666
public static final String CLOUDSQLMYSQL_SUPPORTED_DOC_URL = "https://cloud.google.com/sql/docs/mysql/error-messages";
6767
public static final String POSTGRES_SUPPORTED_DOC_URL =
6868
"https://www.postgresql.org/docs/current/errcodes-appendix.html";
69+
public static final String ORACLE_SUPPORTED_DOC_URL = "https://docs.oracle.com/en/error-help/db/ora-index.html";
6970
public static final String CLOUDSQLPOSTGRES_SUPPORTED_DOC_URL =
7071
"https://cloud.google.com/sql/docs/postgres/error-messages";
7172

oracle-plugin/src/e2e-test/features/source/OracleRunTime.feature

+2
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ Feature: Oracle - Verify data transfer from Oracle source to BigQuery sink
338338
And Save and Deploy Pipeline
339339
And Run the Pipeline in Runtime
340340
And Wait till pipeline is in running state
341+
And Open and capture logs
341342
And Verify the pipeline status is "Failed"
343+
And Close the pipeline logs
342344
Then Open Pipeline logs and verify Log entries having below listed Level and Message:
343345
| Level | Message |
344346
| ERROR | errorLogsMessageInvalidBoundingQuery |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright © 2025 Cask Data, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* 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, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
16+
17+
package io.cdap.plugin.oracle;
18+
19+
import io.cdap.plugin.common.db.DBErrorDetailsProvider;
20+
import io.cdap.plugin.util.DBUtils;
21+
22+
/**
23+
* A custom ErrorDetailsProvider for Oracle plugin.
24+
*/
25+
public class OracleErrorDetailsProvider extends DBErrorDetailsProvider {
26+
27+
@Override
28+
protected String getExternalDocumentationLink() {
29+
return DBUtils.ORACLE_SUPPORTED_DOC_URL;
30+
}
31+
}

oracle-plugin/src/main/java/io/cdap/plugin/oracle/OracleSink.java

+9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ protected LineageRecorder getLineageRecorder(BatchSinkContext context) {
8282
return new LineageRecorder(context, asset);
8383
}
8484

85+
@Override
86+
protected String getErrorDetailsProviderClassName() {
87+
return OracleErrorDetailsProvider.class.getName();
88+
}
89+
90+
@Override
91+
protected String getExternalDocumentationLink() {
92+
return DBUtils.ORACLE_SUPPORTED_DOC_URL;
93+
}
8594

8695
/**
8796
* Oracle action configuration.

oracle-plugin/src/main/java/io/cdap/plugin/oracle/OracleSource.java

+10
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ protected Class<? extends DBWritable> getDBRecordType() {
7171
return OracleSourceDBRecord.class;
7272
}
7373

74+
@Override
75+
protected String getExternalDocumentationLink() {
76+
return DBUtils.ORACLE_SUPPORTED_DOC_URL;
77+
}
78+
79+
@Override
80+
protected String getErrorDetailsProviderClassName() {
81+
return OracleErrorDetailsProvider.class.getName();
82+
}
83+
7484
@Override
7585
protected LineageRecorder getLineageRecorder(BatchSourceContext context) {
7686
String fqn = DBUtils.constructFQN("oracle",

0 commit comments

Comments
 (0)