Working with Python

Preparation

Download and install python from https://www.python.org/downloads

Note: that for conda distributions to work properly, you need to add Format(’%s;%0:s\Library\bin;’, [Version.InstallPath] to your Windows path if it is not there already.

Python Version

  • Our software automatically detects the version of python installed, and loads relevant DLL.
  • 32-bit version of our software uses the 32-bit version of python and
  • 64-bit version of our software uses the 64-bit version of python

Transforming data using Python

Here is a very basic example where we are converting a string into the upper case using python

Python Tranformation

Python Tranformation

Python Tranformation

Python Tranformation

Using scripts is the slowest way to transform the data and it should be avoided. If you do not know how to transform the data ask the question here and we will help you.

Using Python inside package

The script checks a number of the day and shows an appropriate message

Python Script

Python Script

Execution Result

The execution result is determined by Result.Value, Result.Value=1 means success and Result.Value=0 means failure

etltools package

“etltools” package provides a way of communication between python and our software.\ It is only available when python is run from our software.

Supported functions:

etltools.GetVariable('<VariableName>')\
etltools.SetVariable('<VariableName>','Important Value')\
etltools.WriteToLog('Important Message')\
etltools.ExecuteObject(ObjectID)

Use ExecuteObject to execute object from the script inside the package

It returns the result of the package/transformation execution that was called.

  • 0 = success
  • 1 = failure
UDsing Command Line Interface

More Examples

For more technologies supported by our ETL Software see Advanced ETL Processor Versions

Confused? Ask question on our ETL Forum
Last updated: March 14, 2023