embulk-filter-mssql_lookup 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +22 -22
- data/build.gradle +2 -2
- data/classpath/{embulk-filter-mssql_lookup-0.1.4.jar → embulk-filter-mssql_lookup-0.1.5.jar} +0 -0
- data/src/main/java/org/embulk/filter/mssql_lookup/DatabaseConnection.java +12 -10
- metadata +3 -4
- data/classpath/sqljdbc4-4.0.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c29334c9d9bc7a66dcd62e56377af658c8d4db81635e2d8ee557ddecffe8a2e7
|
4
|
+
data.tar.gz: 0ccd4b8ef4577a82e852a481c91ecc3afcf00ea7384d101f035f19f47f54133f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db8f38265b0bcfc93334bb7d491873e62039f100588a1803d1e2788d6fb7fef7bb084db9f21bbd510b96bdf75542e0c106933d56791ac6e979e10143fab5cf63
|
7
|
+
data.tar.gz: 7e4be4ab0bccfc5942cacac755c9c0aa2c1ff17032269d01fcd620f1b696dcaba60770f920171ba13eb49984071ea1e3092fefa19a1685a343738c9a6971da8d
|
data/README.md
CHANGED
@@ -13,26 +13,26 @@ An Embulk filter plugin for Lookup Transformation with MS-SQL database
|
|
13
13
|
|
14
14
|
- **mssql_lookup**: Required attributes for the LookUp Filter Plugin -
|
15
15
|
- **filters**:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
16
|
+
- **type**: Name of lookup type (required)
|
17
|
+
- **driver_path**: driver path of the driver which has been installed in the system
|
18
|
+
- **driver_class**: driver class name
|
19
|
+
- **host**: database host (example `localhost`) (required)
|
20
|
+
- **port**: database port (example port for mssql `1433`) (required)
|
21
|
+
- **database**: database name (required)
|
22
|
+
- **schemaName**: name of schema in database in which table is located
|
23
|
+
- **table_name**: table name of your database (required)
|
24
|
+
- **username**: username for your database (required)
|
25
|
+
- **password**: password for database (required)
|
26
|
+
- **mapping_from**: (Name of columns to be matched with table 2 columns) (required)
|
27
|
+
- **Name of column-1**: column name-1 from input file
|
28
|
+
- **Name of column-2**: column name-2 from input file etc ...
|
29
|
+
- **mapping_to**: (Name of columns to be matched with table 1 columns) (required)
|
30
|
+
- **Name of column-1**: column name-1 from input file
|
31
|
+
- **Name of column-2**: column name-2 from input file
|
32
|
+
- **new_columns**: (New generated column names) (required)
|
33
|
+
- **Name-1,Type-1**: Any Name, Type of the name { name: car_id, type: string }
|
34
|
+
- **Name-2,Type-2**: Any Name, Type of the name { name: category, type: string }
|
35
|
+
- **Name-3,Type-3**: Any Name, Type of the name { name: fuel_capacity, type: string } etc ...
|
36
36
|
## Example - columns
|
37
37
|
|
38
38
|
Customer.csv for table 1 is as follows :-
|
@@ -122,9 +122,9 @@ filters:
|
|
122
122
|
```
|
123
123
|
|
124
124
|
Notes:
|
125
|
-
1. mapping_from attribute should be in same order as mentioned in input file.
|
125
|
+
1. mapping_from attribute should be in the same order as mentioned in the input file.
|
126
126
|
|
127
|
-
2.
|
127
|
+
2. In case with JDBC plugin if any integer column returned as float/decimal then use to cast that column as long as below
|
128
128
|
```
|
129
129
|
column_options:
|
130
130
|
id: {value_type: long}
|
data/build.gradle
CHANGED
@@ -13,13 +13,13 @@ configurations {
|
|
13
13
|
provided
|
14
14
|
}
|
15
15
|
|
16
|
-
version = "0.1.
|
16
|
+
version = "0.1.5"
|
17
17
|
|
18
18
|
sourceCompatibility = 1.8
|
19
19
|
targetCompatibility = 1.8
|
20
20
|
|
21
21
|
dependencies {
|
22
|
-
compile 'com.microsoft.sqlserver:sqljdbc4:4.0'
|
22
|
+
// compile 'com.microsoft.sqlserver:sqljdbc4:4.0'
|
23
23
|
compile "org.embulk:embulk-core:0.9.8"
|
24
24
|
provided "org.embulk:embulk-core:0.9.8"
|
25
25
|
// compile "YOUR_JAR_DEPENDENCY_GROUP:YOUR_JAR_DEPENDENCY_MODULE:YOUR_JAR_DEPENDENCY_VERSION"
|
data/classpath/{embulk-filter-mssql_lookup-0.1.4.jar → embulk-filter-mssql_lookup-0.1.5.jar}
RENAMED
Binary file
|
@@ -63,6 +63,11 @@ public class DatabaseConnection {
|
|
63
63
|
return mssqlJdbcDriver.get();
|
64
64
|
}
|
65
65
|
|
66
|
+
if (driverPath.isPresent()) {
|
67
|
+
logger.info(
|
68
|
+
"\"driver_path\" is set to load the MsSQL JDBC driver class \"{}\". Adding it to classpath.", className);
|
69
|
+
this.addDriverJarToClasspath(driverPath.get());
|
70
|
+
}
|
66
71
|
try {
|
67
72
|
// If the class is found from the ClassLoader of the plugin, that is prioritized the highest.
|
68
73
|
final Class<? extends java.sql.Driver> found = loadJdbcDriverClassForName(className);
|
@@ -76,15 +81,8 @@ public class DatabaseConnection {
|
|
76
81
|
return found;
|
77
82
|
}
|
78
83
|
catch (final ClassNotFoundException ex) {
|
79
|
-
//
|
80
|
-
}
|
81
|
-
|
82
|
-
if (driverPath.isPresent()) {
|
83
|
-
logger.info(
|
84
|
-
"\"driver_path\" is set to load the MsSQL JDBC driver class \"{}\". Adding it to classpath.", className);
|
85
|
-
this.addDriverJarToClasspath(driverPath.get());
|
84
|
+
//throw new ConfigException("The MsSQL JDBC driver for the class \"" + className + "\" is not found.", ex);
|
86
85
|
}
|
87
|
-
else {
|
88
86
|
final File root = this.findPluginRoot();
|
89
87
|
final File driverLib = new File(root, "default_jdbc_driver");
|
90
88
|
final File[] files = driverLib.listFiles(new FileFilter() {
|
@@ -105,12 +103,16 @@ public class DatabaseConnection {
|
|
105
103
|
+ " in \"default_jdbc_driver\" at {}.", className, file.getAbsolutePath());
|
106
104
|
this.addDriverJarToClasspath(file.getAbsolutePath());
|
107
105
|
}
|
108
|
-
}
|
109
106
|
|
110
107
|
try {
|
111
|
-
//
|
108
|
+
// If the class is found from the ClassLoader of the plugin, that is prioritized the highest.
|
112
109
|
final Class<? extends java.sql.Driver> found = loadJdbcDriverClassForName(className);
|
113
110
|
mssqlJdbcDriver.compareAndSet(null, found);
|
111
|
+
if (driverPath.isPresent()) {
|
112
|
+
logger.warn(
|
113
|
+
"\"driver_path\" is set while the MsSQL JDBC driver class \"{}\" is found from the PluginClassLoader."
|
114
|
+
+ " \"driver_path\" is ignored.", className);
|
115
|
+
}
|
114
116
|
return found;
|
115
117
|
}
|
116
118
|
catch (final ClassNotFoundException ex) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-filter-mssql_lookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infoobjects Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -49,8 +49,7 @@ files:
|
|
49
49
|
- LICENSE
|
50
50
|
- README.md
|
51
51
|
- build.gradle
|
52
|
-
- classpath/embulk-filter-mssql_lookup-0.1.
|
53
|
-
- classpath/sqljdbc4-4.0.jar
|
52
|
+
- classpath/embulk-filter-mssql_lookup-0.1.5.jar
|
54
53
|
- config/checkstyle/checkstyle.xml
|
55
54
|
- config/checkstyle/default.xml
|
56
55
|
- example/mssql-filter-lookup_testing.yml.liquid
|
data/classpath/sqljdbc4-4.0.jar
DELETED
Binary file
|