Skip to content
Merged
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 @@ -61,6 +61,7 @@ public final class DBUtils {

public static final Calendar PURE_GREGORIAN_CALENDAR = createPureGregorianCalender();
public static final String MYSQL_SUPPORTED_DOC_URL = "https://dev.mysql.com/doc/mysql-errors/9.0/en/";
public static final String MARIADB_SUPPORTED_DOC_URL = "https://mariadb.com/kb/en/mariadb-error-codes/";
public static final String MSSQL_SUPPORTED_DOC_URL =
"https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors";
public static final String CLOUDSQLMYSQL_SUPPORTED_DOC_URL = "https://cloud.google.com/sql/docs/mysql/error-messages";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright © 2025 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.mariadb;


import io.cdap.plugin.mysql.MysqlErrorDetailsProvider;
import io.cdap.plugin.util.DBUtils;

/**
* A custom ErrorDetailsProvider for MariaDb plugins.
*/
public class MariadbErrorDetailsProvider extends MysqlErrorDetailsProvider {

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import io.cdap.plugin.db.SchemaReader;
import io.cdap.plugin.db.config.DBSpecificSinkConfig;
import io.cdap.plugin.db.sink.AbstractDBSink;
import io.cdap.plugin.util.DBUtils;

import io.cdap.plugin.mysql.MysqlDBRecord;
import java.util.Map;
import javax.annotation.Nullable;

Expand Down Expand Up @@ -60,6 +60,16 @@ protected SchemaReader getSchemaReader() {
}


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

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

/**
* MariaDB Sink Config.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ protected SchemaReader getSchemaReader() {
return new MariadbSchemaReader(null, mariadbSourceConfig.getConnectionArguments());
}

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

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

/**
* MaraiDB source mariadbSourceConfig.
*/
Expand Down
Loading