Skip to content

Commit

Permalink
Merge pull request #12 from robertrichter/master
Browse files Browse the repository at this point in the history
Added features - mentioned in readme
  • Loading branch information
jlolling authored Oct 25, 2017
2 parents ce85e19 + 66ddcf6 commit 03449ca
Show file tree
Hide file tree
Showing 24 changed files with 1,615 additions and 431 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target/
/talend_component/.classpath
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
Expand All @@ -19,5 +24,6 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
9 changes: 6 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.8"/>
</faceted-project>
77 changes: 76 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,77 @@
# Talend component tHashRow
This component creates a hash value for a schema.
This component creates a hash value. All configured input columns will be concateneded with the given delimiter. The resulting string will be used to calculate the hash value. Every configured hash input manipulation will be applied, before the hash is calculated and populated to the selected output column.

# Basic Settings

## Basic configuration
### Hash type
Algorithm that will be used to generate the hash

### Hash output
Column of the output schema in which the hash value will be written

## Hash input manipulation

### Relevant fields

|Column|Use|Trim|Case Sensitive|
|------|---|----|--------------|
|List of input columns| Check if column should added to the hash| Check if column should be trimmed| Select if column should be upper case, lower case, case sensitive or not in use (eg. in case of numeric values)

### Delimiter
Delimter to seperate the input values

### Null replacement
Value that will be used to calculate the hash, if input value is null
- Example if replacement value is set to "#NULL#""
+ COLUMN_1 = "Test"
+ COLUMN_2 = null
+ COLUMN_3 = 123
+ Hash Input results in "Test";#NULL#;123

### Fraction size (float)
Maximum precision of float values

### Fraction size (double)
Maximum precision of double values

### Number format
List of available number formats. Grouping is gernerally disabled.

### Date format
#### Format date as miliseconds
- if checked
+ all date fields will be represented as miliseconds since unix epoch
- if unchecked
+ all date fields will be represented in the given date format

### Enable string quoting
String based fields will be surrounded with the given quotation mark

### Cut of empty trialing hash input values
If checked all empty trailing values will be truncated before hash will be calculated
- Example without quoting
+ Hash Input = CUSTOMER A;1234;STREET 1;;;
+ results in CUSTOMER A;1234;STREET 1
- Example with quoting
+ Hash Input = "CUSTOMER A";1234;"STREET 1";"";;""
+ results also in CUSTOMER A;1234;STREET 1

# Advanced Settings

## Hash output manipulation
### Modify hash output
If all input values are null, the hash value will be replaced with the given value
- Example 1
+ checked and value is set to "22222222222222222222222222222222"
+ Hash input = ;;;;;
+ Hash value = "22222222222222222222222222222222"
- Example 2
+ unchecked
+ Hash input = ;;;;;
+ Hash value = 8f0158355357e8302939ea687dba9363

## Additional settings
### Show hash input
If checked the hash input (concatenation of all input values) will be exposed to the selected column

30 changes: 4 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<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>
<organization>
<name>Jan Lolling</name>
</organization>
<groupId>de.jlo.talendcomp</groupId>
<artifactId>jlo-talendcomp-hash</artifactId>
<version>1.2</version>
<groupId>de.robr.talendcomp</groupId>
<artifactId>thashrow</artifactId>
<version>1.4</version>
<packaging>jar</packaging>

<name>talendcomp_tHash</name>
Expand All @@ -23,24 +20,5 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>de.cimt.talendcomp</groupId>
<artifactId>cimt-talendcomp-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>tHashRow</id>
<goals>
<goal>component</goal>
</goals>
<configuration>
<componentName>tHashRow</componentName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading

0 comments on commit 03449ca

Please sign in to comment.