Skip to content

Commit

Permalink
[feat] add excel dataSource
Browse files Browse the repository at this point in the history
  • Loading branch information
bebee4java committed Nov 9, 2020
1 parent f59ba2b commit e85794c
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
<artifactId>scalatra-swagger_${scala.binary.version}</artifactId>
<version>${scalatra.version}</version>
</dependency>

<dependency>
<groupId>tech.ides</groupId>
<artifactId>ds-spark-excel-${spark.big.version}_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>


Expand Down
35 changes: 35 additions & 0 deletions external/ds-spark-excel/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>DataLinked</artifactId>
<groupId>tech.ides</groupId>
<version>1.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>ds-spark-excel-${spark.big.version}_${scala.binary.version}</artifactId>

<dependencies>
<dependency>
<groupId>tech.ides</groupId>
<artifactId>ides-core-${spark.big.version}_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_${scala.binary.version}</artifactId>
<version>${spark.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.crealytics</groupId>
<artifactId>spark-excel_${scala.binary.version}</artifactId>
<version>0.13.5</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package tech.ides.external.datasource.excel

import tech.ides.datasource.{BaseDataSource, BaseFileDataSource, DataSource}
import tech.ides.datasource.DataSource.Method._

/**
*
* Created by songgr on 2020/10/25.
*/

@DataSource(
types = Array(SOURCE, SINK),
name = "excel",
sinceVersion = "1.0.0"
)
class ExcelDataSource extends BaseFileDataSource {

override def fullFormat: String = "com.crealytics.spark.excel"

override def shortFormat: String = "excel"
}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<module>dsl</module>
<module>engine</module>
<module>repl</module>
<module>external/ds-spark-excel</module>
</modules>


Expand Down

0 comments on commit e85794c

Please sign in to comment.