Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Basic Calculations / Transformations

Basic Calculations / Transformations 3 years 5 months ago #14878

  • Ivey
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
I understand the Advanced ETL can perform calculations, I'm wondering if this can performed on Visual Importer? and does it use the same scripting language?

Please Log in or Create an account to join the conversation.

Basic Calculations / Transformations 3 years 5 months ago #14879

Hi Ivey,

Visual Importer ETL is capable of performing certain calculations particularly during import. Basic Calculations can be performed by setting the mapping type to calculation and type constant or formula into calculation edit box.



An expression editor should also be able to assist you in performing more complicated expression and computations.



Further Reading:

Please Log in or Create an account to join the conversation.

Basic Calculations / Transformations 3 years 5 months ago #14883

  • Ivey
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Do you have any example on how to perform simple calculations and some for formatting (example: 100 to 100 USD)
The following user(s) said Thank You: KevinJohn

Please Log in or Create an account to join the conversation.

Basic Calculations / Transformations 3 years 5 months ago #14884

Simple calculations can be performed by the following syntax

  • When multiplying fields: StrToFloat([INTEGER_F]) * StrToFloat( [FLOAT_F])
  • When adding USD to the Integer variable [INTEGER_F] + "USD“
  • and expression that require conditional statement we can have if(StrToFloat([FLOAT_F])> StrToFloat([INTEGER_F]),1,2) Trim('[CHAR_F]')

Please Log in or Create an account to join the conversation.

Basic Calculations / Transformations 3 years 5 months ago #14970

Here are some of the BEST Examples of making Calculations

For fields that require numeric values it is best to convert such from String to Float

The following pattern should avoid problems with data quality.
  1. Create variables for every input parameter
  2. Assign input parameters to variables inside "try expect" block
  3. Perform calculations
  4. Return value


Example:

Var
vIncome: Float;
vExpenditure: Float;

begin
// Converting strings to Floats
Try
vIncome:=Income;
except
vIncome:=0;
end;

try
vExpenditure:=Expenditure;
except
vExpenditure:=0;
end;

// Calculation

Result := vIncome-vExpenditure;
end;



.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

We have 142 guests and one member online