Showing posts with label Talend. Show all posts
Showing posts with label Talend. Show all posts

Wednesday, July 8, 2020

Talend: Import/Export Items


Export: You can export multiple items from the project onto a directory or as an archive zipped file


1.       In the Repository tree view, select the items you want to export, you can have multiple selections as well













2.1 You can either go with the root directory or Archive file method. Root directory will create the files in the selected folder along with the parent tree structure

Export Dependencies check box exports the routine dependencies along with Jobs you are exporting (Ex: Related File Excel mappings, DB connection etc.)














2.1.1 It created the Project Name and the all the related job files.






2.2 Archive file option will create a ZIP file at the destination
      Export Dependencies check box exports the routine dependencies along with Jobs you are exporting












2.2.1 Zip file created






Import:

1    1.  Right click on the folder or Job design and select ‘Import items’













2.1. The Root directory option will create the structure the way it was exported. You can select individual items as well.
Overwrite existing items check box overwrites the existing items with those having the same names to be imported.

















2.1.1 Result will be as like below










2.2 Archive file option will also give you the same result


Talend: tAggregateRow

tAggregateRow palette can be used to get the aggregate value of any column or to get column based on the unique key


Talend: tReplace

Use this palette to replace any column value with a new value


Talend: tSortRow

Use this for sorting the output


Tuesday, June 30, 2020

Talend: tUniqRow to Remove Duplicate Rows

tUniqRow Palette can be used to remove duplicate rows. You can define the unique row combination key in the Basic settings section.

Below, the keys attributes for a unique row are DateStart, PersonId and SourceSystemId



Talend: tFilterRow to Filter Null rows

tFilterRow Palette can be used to filter out unwanted rows from the output, here I am giving an example to filter out Null rows

Below, it is filtering out the rows where assignmentNumber is Null

In the 'Use advanced mode'
Relational.ISNULL(input_row.AssignmentNumber)?false:true


Talend: If Else Condition on tMap

In the recent ETL routine on the Talend job I had to compare two dates and select the greater one.

You have many predefined functions available on expression builder, I used TalendDate.compareDate function to compare the dates and If else condition to get the max one.

 Open the expression builder by clicking on three dots

Select the TalendDate.compareDate function and drag the date variables from the list 

TalendDate.compareDate(row2.ASS_START_DATE,row7.MGR_START_DATE)==-1?row7.MGR_START_DATE:row2.ASS_START_DATE 

Here, compareDate returns -1 if argumen1 is less than argument1

== represents IF, ? represents THEN and : represents ELSE here

Note: You use == for integer and .equals("") for string output.

Ex: row2.status.equals("Active")?"Select":"Ignore"

Wednesday, March 25, 2020

'Java was started but returned exit code 1' Error

Please check the correct java version is installed and java environment is set correctly.

'java -version' in command prompt (cmd) will show you the java version installed
'where java' will show you the java location








Ensure proper version of JDK is installed, you can download JDK from here.
Set the JAVA_HOME environment variable.