File tree 4 files changed +53
-0
lines changed
database-commons/src/main/java/io/cdap/plugin/util
mssql-plugin/src/main/java/io/cdap/plugin/mssql
4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ public final class DBUtils {
61
61
62
62
public static final Calendar PURE_GREGORIAN_CALENDAR = createPureGregorianCalender ();
63
63
public static final String MYSQL_SUPPORTED_DOC_URL = "https://dev.mysql.com/doc/mysql-errors/9.0/en/" ;
64
+ public static final String MSSQL_SUPPORTED_DOC_URL =
65
+ "https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors" ;
64
66
public static final String CLOUDSQLMYSQL_SUPPORTED_DOC_URL = "https://cloud.google.com/sql/docs/mysql/error-messages" ;
65
67
public static final String POSTGRES_SUPPORTED_DOC_URL =
66
68
"https://www.postgresql.org/docs/current/errcodes-appendix.html" ;
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 .mssql ;
18
+
19
+ import io .cdap .plugin .common .db .DBErrorDetailsProvider ;
20
+ import io .cdap .plugin .util .DBUtils ;
21
+
22
+ /**
23
+ * A custom ErrorDetailsProvider for SQL Server plugins.
24
+ */
25
+ public class SqlServerErrorDetailsProvider extends DBErrorDetailsProvider {
26
+
27
+ @ Override
28
+ protected String getExternalDocumentationLink () {
29
+ return DBUtils .MSSQL_SUPPORTED_DOC_URL ;
30
+ }
31
+ }
Original file line number Diff line number Diff line change @@ -88,6 +88,16 @@ protected LineageRecorder getLineageRecorder(BatchSinkContext context) {
88
88
return new LineageRecorder (context , asset );
89
89
}
90
90
91
+ @ Override
92
+ protected String getErrorDetailsProviderClassName () {
93
+ return SqlServerErrorDetailsProvider .class .getName ();
94
+ }
95
+
96
+ @ Override
97
+ protected String getExternalDocumentationLink () {
98
+ return DBUtils .MSSQL_SUPPORTED_DOC_URL ;
99
+ }
100
+
91
101
/**
92
102
* MSSQL action configuration.
93
103
*/
Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ protected Class<? extends DBWritable> getDBRecordType() {
75
75
return SqlServerSourceDBRecord .class ;
76
76
}
77
77
78
+ @ Override
79
+ protected String getErrorDetailsProviderClassName () {
80
+ return SqlServerErrorDetailsProvider .class .getName ();
81
+ }
82
+
78
83
@ Override
79
84
protected LineageRecorder getLineageRecorder (BatchSourceContext context ) {
80
85
String fqn = DBUtils .constructFQN ("mssql" ,
@@ -85,6 +90,11 @@ protected LineageRecorder getLineageRecorder(BatchSourceContext context) {
85
90
return new LineageRecorder (context , asset );
86
91
}
87
92
93
+ @ Override
94
+ protected String getExternalDocumentationLink () {
95
+ return DBUtils .MSSQL_SUPPORTED_DOC_URL ;
96
+ }
97
+
88
98
/**
89
99
* MSSQL source config.
90
100
*/
You can’t perform that action at this time.
0 commit comments