Skip to content

Commit

Permalink
Support CrateDB database plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio De Lorenzis committed Apr 15, 2024
1 parent 6f2f238 commit f7386ed
Show file tree
Hide file tree
Showing 15 changed files with 1,332 additions and 3 deletions.
6 changes: 6 additions & 0 deletions assemblies/lib-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<properties>
<clickhouse.jdbc.version>0.5.0</clickhouse.jdbc.version>
<cratedb-jdbc.version>2.7.0</cratedb-jdbc.version>
<derby.version>10.16.1.1</derby.version>
<duckdb.version>0.10.0</duckdb.version>
<h2.version>2.2.224</h2.version>
Expand Down Expand Up @@ -114,6 +115,11 @@
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite.version}</version>
</dependency>
<dependency>
<groupId>io.crate</groupId>
<artifactId>crate-jdbc</artifactId>
<version>${cratedb-jdbc.version}</version>
</dependency>
</dependencies>

<repositories>
Expand Down
46 changes: 46 additions & 0 deletions assemblies/plugins/databases/cratedb-assemblies/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>hop-assemblies-plugins-databases</artifactId>
<groupId>org.apache.hop</groupId>
<version>2.9.0-SNAPSHOT</version>
</parent>

<artifactId>hop-assemblies-plugins-databases-cratedb</artifactId>
<version>2.9.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Hop Assemblies Plugins Databases CrateDB</name>
<description />

<properties>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.hop</groupId>
<artifactId>hop-databases-cratedb</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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.
~
-->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<id>hop-assemblies-plugins-databases-cratedb</id>
<formats>
<format>zip</format>
</formats>
<baseDirectory>databases/cratedb</baseDirectory>
<files>
<file>
<source>${project.basedir}/src/main/resources/version.xml</source>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>${project.basedir}/src/main/resources/dependencies.xml</source>
<outputDirectory>.</outputDirectory>
<filtered>true</filtered>
</file>
</files>
<fileSets>
<fileSet>
<outputDirectory>lib</outputDirectory>
<excludes>
<exclude>**/*</exclude>
</excludes>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>org.apache.hop:hop-databases-cratedb:jar</include>
</includes>
</dependencySet>
</dependencySets>
</assembly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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.
~
-->

<dependencies>
<folder>../postgresql</folder>
</dependencies>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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.
~
-->

<version>${project.version}</version>
3 changes: 2 additions & 1 deletion assemblies/plugins/databases/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<module>cache-assemblies</module>
<module>clickhouse-assemblies</module>
<module>cockroachdb-assemblies</module>
<module>cratedb-assemblies</module>
<module>db2-assemblies</module>
<module>derby-assemblies</module>
<module>doris-assemblies</module>
Expand Down Expand Up @@ -77,4 +78,4 @@
</modules>


</project>
</project>
17 changes: 15 additions & 2 deletions assemblies/plugins/dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hop</groupId>
<artifactId>hop-assemblies-plugins-transforms-pipelineexecutor</artifactId>
Expand Down Expand Up @@ -3224,6 +3224,19 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hop</groupId>
<artifactId>hop-assemblies-plugins-databases-cratedb</artifactId>
<version>${project.version}</version>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hop</groupId>
<artifactId>hop-assemblies-plugins-misc-async</artifactId>
Expand Down Expand Up @@ -3459,4 +3472,4 @@
</dependency>

</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
////
[[database-plugins-postgresql]]
:documentationPath: /database/databases/
:language: en_US

= CrateDB

[cols="2*",options="header"]
|===
| Option | Info
|Type | Relational
|Driver | Included
|Version Included | 2.7.0
|Hop Dependencies | None
|Documentation | https://cratedb.com/docs/jdbc/en/latest/index.html[Documentation Link]
|JDBC Url | jdbc:crate://host:port/database
|Driver folder | <Hop Installation>/lib/jdbc
|===
90 changes: 90 additions & 0 deletions plugins/databases/cratedb/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.hop</groupId>
<artifactId>hop-databases-cratedb</artifactId>
<version>2.9.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hop Plugins Databases CrateDB</name>

<parent>
<groupId>org.apache.hop</groupId>
<artifactId>hop-plugins-databases</artifactId>
<version>2.9.0-SNAPSHOT</version>
</parent>

<properties>
<!-- Test running configuration -->
<maven-surefire-plugin.reuseForks>true</maven-surefire-plugin.reuseForks>
<maven-failsafe-plugin.reuseForks>false</maven-failsafe-plugin.reuseForks>
<cratedb-jdbc.version>2.7.0</cratedb-jdbc.version>
</properties>

<dependencies>
<dependency>
<groupId>io.crate</groupId>
<artifactId>crate-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.hop</groupId>
<artifactId>hop-databases-postgresql</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>cratedb</artifactId>
<version>1.19.7</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.crate</groupId>
<artifactId>crate-jdbc</artifactId>
<version>${cratedb-jdbc.version}</version> <!-- Adjust according to your CrateDB version -->
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading

0 comments on commit f7386ed

Please sign in to comment.