Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #164 from utzwestermann/export-float
Browse files Browse the repository at this point in the history
Export float
  • Loading branch information
utzwestermann authored May 26, 2017
2 parents d13b326 + 6c2c37f commit a3040e4
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>schedoscope</groupId>
<artifactId>schedoscope-suite</artifactId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Schedoscope Suite</name>
<description>A wrapper building all modules of the Schedoscope project</description>
Expand All @@ -25,7 +25,7 @@
<mrunit.version>1.1.0</mrunit.version>
<hiveunit.version>1.2.5</hiveunit.version>
<minioozie.version>1.2.3</minioozie.version>
<schedoscope.version>0.8.5-SNAPSHOT</schedoscope.version>
<schedoscope.version>0.8.6-SNAPSHOT</schedoscope.version>
</properties>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-conf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-export/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class JdbcOutputWritable implements Writable, DBWritable {

private static final String STRING = "string";
private static final String DOUBLE = "double";
private static final String FLOAT = "float";
private static final String BOOLEAN = "boolean";
private static final String INTEGER = "int";
private static final String LONG = "long";
Expand Down Expand Up @@ -103,6 +104,14 @@ public void write(PreparedStatement ps) throws SQLException {
} else {
ps.setNull(i + 1, Types.DOUBLE);
}
} else if (type.equals(JdbcOutputWritable.FLOAT)) {
if (!record.get(i).getRight().equals("NULL")) {
ps.setDouble(i + 1,
Double.parseDouble(record.get(i).getRight()));
} else {
ps.setNull(i + 1, Types.FLOAT);
}

} else if (type.equals(JdbcOutputWritable.BOOLEAN)) {
if (!record.get(i).getRight().equals("NULL")) {
ps.setBoolean(i + 1,
Expand Down Expand Up @@ -132,9 +141,13 @@ public void write(PreparedStatement ps) throws SQLException {
ps.setString(i + 1, record.get(i).getRight());
}
}
} catch (NumberFormatException n) {
} catch (
NumberFormatException n)

{
n.printStackTrace();
}

}

@Override
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-metascope/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-transformation-oozie/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-transformation-pig/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-transformation-shell/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-transformation-spark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion schedoscope-tutorial/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>schedoscope-suite</artifactId>
<groupId>schedoscope</groupId>
<version>0.8.5-SNAPSHOT</version>
<version>0.8.6-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down

0 comments on commit a3040e4

Please sign in to comment.