Python Analysis transform - Value was either too large or too small for UInt64

I am running into an issue when using the Python Analysis transform, whenever the source data contains negative numbers I get the error “Value was either too large or too small for UInt64”, dispite the data type in the input not being a UInt.

I have set up a minimal cube to demonstrate the issue:
image

The manual query output is shown as an Int32, and contains negative numbers. If I preview the data of this transform I see the numbers all fine:
image

The python analysis transform contains a single statement that returns the input:
image

If I try to preview the data for this transform I get the error indicating it is trying to convert the input to a UInt64:

Is there something I am not configuring correctly, or is this an issue with the way the transform works? (The server is running Python 3.6.6)

This issue (#80408) is fixed and under testing for a future revision. What is the severity of this issue for you?

Hi Ilya,

Thats great, currently I am working around around the issue when I know it will occur by adding a calculated value transform to offset the negative values to be positive before they get to the python analysis, but obviously this is not ideal as I have to do this in many places and makes it more difficult for others to understand.

Do you know which release this is planned for?

Another temporary solution would be to convert your values to a string before the python analysis. In the analysis, you could then go through that list, convert each value to float, and do further mathematical operations on those values.
// Declaring two empty lists for our values
floats = []
mathTest = []
// $value$ is a list of strings inputted into the analysis
for val in $value$:
// Convert each string to float type and append to list ‘floats’
floats.append(float(val))
// Test to see that math operations will work on the new list
for i in floats:
mathTest.append(i-1)
return mathTest

Hi Andy,

The fix for this issue is now available in our minor release (Dundas BI v6.0.2).

The release notes are published:
https://www.dundas.com/Support/learning/documentation/release-notes/dundas-bi-release-notes?v=6.0.2

Thank you for your patience