tDotNETRow
Facilitates data transform by utilizing custom or built-in .NET
classes.
tDotNETRow sends data to and
from libraries and classes within .NET or other custom DLL files.
tDotNETRow Standard properties
These properties are used to configure tDotNETRow running in the Standard Job framework.
The Standard
tDotNETRow component belongs to the DotNET family.
The component in this framework is generally available.
Basic settings
Schema and Edit |
A schema is a row description, it defines the number of fields to be processed and |
|
Built-in: No property data stored |
|
Repository: Select the Repository |
Use a static method |
Select this check box to invoke a static method in .NET and this |
Propagate a data to output |
Select this check box to propagate a transformed data to |
Use an existing instance |
Select this check box to reuse an existing instance of a .NET
Existing instance to use: Select Note:
This check box will be disabled if you have selected |
Dll to load |
Type in the path, or browse to the DLL library containing the |
Fully qualified class name(i.e. |
Enter a fully qualified name for the class of interest. |
Method name |
Fill this field with the name of the method to be invoked in |
Value(s) to pass to the constructor |
Click the plus button to add one or more lines for values to be The valid value(s) should be the parameters required by the class |
Method Parameters |
Click the plus button to add one or more lines for parameters to |
Output value target column |
Select a column in the output row from the list to put value into |
Advanced settings
Create a new instance at each row |
Select this check box to create a new instance at each row that |
Method doesn’t return a value |
Select this check box to invoke a method without returning a value |
Returns an instance of a .NET Object |
Select this check box to return an instance of a .NET object as a |
Store the returned value for later use |
Select this check box to store the returned value of a method for |
tStatCatcher Statistics |
Select this check box to collect log data at the component |
Global Variables
Global Variables |
NB_LINE: the number of rows processed. This is an After
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component is utilized to integrate with .NET objects. To use this component, you must first install the runtime DLLs, So ensure that the runtime and all of the other DLLs which the DLL Note:
The required DLLs can be installed in the System32 folder or in the bin folder of the Java runtime to be used. If you need to export a Job using this component to run it outside For users of |
Scenario: Utilizing .NET in Talend
This scenario describes a three-component Job that uses a DLL library containing a
class called Test1.Class1 Class and invokes a method
on it that processes the value and output the result onto the console.

Prerequisites
Before replicating this scenario, you need first to build up your runtime
environment.
-
Create the DLL to be loaded by tDotNETInstantiate
This example class built into .NET reads as follows:
12345678910111213141516171819202122using System;using System.Collections.Generic;using System.Text;namespace Test1{public class Class1{string s = null;public Class1(string s){this.s = s;}public string getValue(){return "Return Value from Class1: " + s;}}}This class reads the input value and adds the text Return Value from Class1: in front of this value. It is
compiled using the latest .NET. -
Install the runtime DLL from the latest .NET. In this scenario, we use
janet-win32.dll on Windows 32-bit version and place it in the
System32 folder.Thus the runtime DLL is compatible with the DLL to be loaded.
Connecting components
- Drop the following components from the Palette to the design workspace: tDotNETInstantiate, tDotNETRow and tLogRow.
-
Connect tDotNETInstantiate to tDotNETRow using a Trigger
On Subjob OK connection. -
Connect tDotNETRow to tLogRow using a Row
Main connection.
Configuring tDotNETInstantiate
-
Double-click tDotNETInstantiate to
display its Basic settings view and define
the component properties. -
Click the three-dot button next to the Dll to
load field and browse to the DLL file to be loaded.
Alternatively, you can fill the field with an assembly. In this example, we
use :“C:/Program
Files/ClassLibrary1/bin/Debug/ClassLibrary1.dll”” -
Fill the Fully qualified class name field
with a valid class name to be used. In this example, we use:“Test1.Class1” -
Click the plus button beneath the Value(s) to pass
to the constructor table to add a new line for the value to
be passed to the constructor.In this example, we use:"Hello world"
Configuring tDotNETRow
-
Double-click tDotNETRow to display its
Basic settings view and define the
component properties. -
Select Propagate data to output check
box. -
Select Use an existing instance check box
and select tDotNETInstantiate_1 from the
Existing instance to use list on the
right. -
Fill the Method Name field with a method
name to be used. In this example, we use “getValue”, a
custom method. -
Click the three-dot button next to Edit
schema to add one column to the schema.Click the plus button beneath the table to add a new column to the schema
and click OK to save the setting. - Select newColumn from the Output value target column list.
Configuring tLogRow
-
Double-click tLogRow to display its
Basic settings view and define the
component properties. -
Click Sync columns button to retrieve the
schema defined in the preceding component. - Select Table in the Mode area.
Save your Job and press F6 to execute it.

From the result, you can read that the text Return Value from Class1
is added in front of the retrieved value Hello world
.