File tree Expand file tree Collapse file tree 4 files changed +55
-1
lines changed
database-commons/src/main/java/io/cdap/plugin/util
mariadb-plugin/src/main/java/io/cdap/plugin/mariadb Expand file tree Collapse file tree 4 files changed +55
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ public final class DBUtils {
6161
6262 public static final Calendar PURE_GREGORIAN_CALENDAR = createPureGregorianCalender ();
6363 public static final String MYSQL_SUPPORTED_DOC_URL = "https://dev.mysql.com/doc/mysql-errors/9.0/en/" ;
64+ public static final String MARIADB_SUPPORTED_DOC_URL = "https://mariadb.com/kb/en/mariadb-error-codes/" ;
6465 public static final String MSSQL_SUPPORTED_DOC_URL =
6566 "https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors" ;
6667 public static final String CLOUDSQLMYSQL_SUPPORTED_DOC_URL = "https://cloud.google.com/sql/docs/mysql/error-messages" ;
Original file line number Diff line number Diff line change 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 .mariadb ;
18+
19+
20+ import io .cdap .plugin .mysql .MysqlErrorDetailsProvider ;
21+ import io .cdap .plugin .util .DBUtils ;
22+
23+ /**
24+ * A custom ErrorDetailsProvider for MariaDb plugins.
25+ */
26+ public class MariadbErrorDetailsProvider extends MysqlErrorDetailsProvider {
27+
28+ @ Override
29+ protected String getExternalDocumentationLink () {
30+ return DBUtils .MARIADB_SUPPORTED_DOC_URL ;
31+ }
32+
33+ }
Original file line number Diff line number Diff line change 2525import io .cdap .plugin .db .SchemaReader ;
2626import io .cdap .plugin .db .config .DBSpecificSinkConfig ;
2727import io .cdap .plugin .db .sink .AbstractDBSink ;
28+ import io .cdap .plugin .util .DBUtils ;
2829
29- import io .cdap .plugin .mysql .MysqlDBRecord ;
3030import java .util .Map ;
3131import javax .annotation .Nullable ;
3232
@@ -60,6 +60,16 @@ protected SchemaReader getSchemaReader() {
6060 }
6161
6262
63+ @ Override
64+ protected String getErrorDetailsProviderClassName () {
65+ return MariadbErrorDetailsProvider .class .getName ();
66+ }
67+
68+ @ Override
69+ protected String getExternalDocumentationLink () {
70+ return DBUtils .MARIADB_SUPPORTED_DOC_URL ;
71+ }
72+
6373 /**
6474 * MariaDB Sink Config.
6575 */
Original file line number Diff line number Diff line change @@ -81,6 +81,16 @@ protected SchemaReader getSchemaReader() {
8181 return new MariadbSchemaReader (null , mariadbSourceConfig .getConnectionArguments ());
8282 }
8383
84+ @ Override
85+ protected String getErrorDetailsProviderClassName () {
86+ return MariadbErrorDetailsProvider .class .getName ();
87+ }
88+
89+ @ Override
90+ protected String getExternalDocumentationLink () {
91+ return DBUtils .MARIADB_SUPPORTED_DOC_URL ;
92+ }
93+
8494 /**
8595 * MaraiDB source mariadbSourceConfig.
8696 */
You can’t perform that action at this time.
0 commit comments