SSIS LOG Function

The SSIS LOG function is a mathematical function that returns the base 10 logarithmic value of the specified number or numeric expression. This article explains how to use the LOG function with an example and the syntax for finding the base 10 logarithmic value is as shown below.

LOG(<<numeric_expression>>)

To demonstrate the LOG function, we use the Product table below, which has 14 records. Please refer to the Derived Column Transformation, Union All Transformation, Built-in Functions, and SQL Server articles in SSIS.

Source Table

SSIS LOG function

For this base 10 logarithmic value example, add a Data Flow Task and double-click to enter the Data Flow region. Next, add the OLE DB Source to read data from the above SQL database product table. Please join the OLE DB Source to Derived Column because it helps to write LOG expressions and create new columns.

Data Flow to add Derived Column

Next, double-click on it to open the Derived Column Transformation Editor. Drag and drop the SSIS LOG function to the row cell under the Expression and replace the numeric_expression with the Sales amount, Estimated, and Orders to find the base 10 logarithmic values. Either you can manually delete the complete numeric_expression or drag and drop the Orders column will automatically replace it.

The below SSIS LOG function expressions return the base 10 logarithmic values of the Sales amount, Estimated, and Orders columns.

LOG( [SalesAmount] )

LOG( [Estimated] )

LOG( [Orders] )
SSIS LOG Function expression to find base 10 logarithmic value

Click OK to close the Editor window.

Drag and drop the Union All Transformation and connect the Derived Column to it. Next, right-click on the connection node and choose the Enable Data Viewer. Please run the SSIS LOG function package to see the base 10 logarithmic values of the Sales amount, Estimated, and Orders columns.

SSIS LOG Function to find base 10 logarithmic value