Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLUGIN-1835] Add OracleErrorDetailsProvider #532

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public final class DBUtils {
public static final String CLOUDSQLMYSQL_SUPPORTED_DOC_URL = "https://cloud.google.com/sql/docs/mysql/error-messages";
public static final String POSTGRES_SUPPORTED_DOC_URL =
"https://www.postgresql.org/docs/current/errcodes-appendix.html";
public static final String ORACLE_SUPPORTED_DOC_URL = "https://docs.oracle.com/en/error-help/db/ora-index.html";

// Java by default uses October 15, 1582 as a Gregorian cut over date.
// Any timestamp created with time less than this cut over date is treated as Julian date.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ Feature: Oracle - Verify data transfer from Oracle source to BigQuery sink
And Save and Deploy Pipeline
And Run the Pipeline in Runtime
And Wait till pipeline is in running state
And Open and capture logs
And Verify the pipeline status is "Failed"
And Close the pipeline logs
Then Open Pipeline logs and verify Log entries having below listed Level and Message:
| Level | Message |
| ERROR | errorLogsMessageInvalidBoundingQuery |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright © 2024 Cask Data, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

package io.cdap.plugin.oracle;

import io.cdap.plugin.db.DBErrorDetailsProvider;
import io.cdap.plugin.util.DBUtils;

/**
* A custom ErrorDetailsProvider for Oracle plugin.
*/
public class OracleErrorDetailsProvider extends DBErrorDetailsProvider {
@Override
protected String getExternalDocumentationLink() {
return DBUtils.ORACLE_SUPPORTED_DOC_URL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ protected LineageRecorder getLineageRecorder(BatchSinkContext context) {
return new LineageRecorder(context, asset);
}

@Override
protected String getErrorDetailsProviderClassName() {
return OracleErrorDetailsProvider.class.getName();
}


/**
* Oracle action configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ protected Class<? extends DBWritable> getDBRecordType() {
return OracleSourceDBRecord.class;
}

@Override
protected String getExternalDocumentationLink() {
return DBUtils.ORACLE_SUPPORTED_DOC_URL;
}

@Override
protected String getErrorDetailsProviderClassName() {
return OracleErrorDetailsProvider.class.getName();
}

@Override
protected LineageRecorder getLineageRecorder(BatchSourceContext context) {
String fqn = DBUtils.constructFQN("oracle",
Expand Down
Loading