File tree Expand file tree Collapse file tree 4 files changed +46
-0
lines changed
database-commons/src/main/java/io/cdap/plugin/util
oracle-plugin/src/main/java/io/cdap/plugin/oracle Expand file tree Collapse file tree 4 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ public final class DBUtils {
6464 public static final String CLOUDSQLMYSQL_SUPPORTED_DOC_URL = "https://cloud.google.com/sql/docs/mysql/error-messages" ;
6565 public static final String POSTGRES_SUPPORTED_DOC_URL =
6666 "https://www.postgresql.org/docs/current/errcodes-appendix.html" ;
67+ public static final String ORACLE_SUPPORTED_DOC_URL = "https://docs.oracle.com/en/error-help/db/ora-index.html" ;
6768
6869 // Java by default uses October 15, 1582 as a Gregorian cut over date.
6970 // Any timestamp created with time less than this cut over date is treated as Julian date.
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright © 2024 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 .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+ @ Override
27+ protected String getExternalDocumentationLink () {
28+ return DBUtils .ORACLE_SUPPORTED_DOC_URL ;
29+ }
30+ }
Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ 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+
8590
8691 /**
8792 * Oracle action configuration.
Original file line number Diff line number Diff 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" ,
You can’t perform that action at this time.
0 commit comments