Pivoting Node converts long to integer

Hi! When I use Pivoting Node for aggregation of variable having long data type it converts aggregated variable to int data type against my will. Variable takes more than billion, so int is unacceptable data type.
Please give advice what must I do to avoid this situation.
Thanks in advance.

Hi @Goger!

What aggregation are you using?
Can you maybe share and workflow example?

Br,
Ivan

Hi @ipazin! I use Sum aggregation. How I can share workflow example? Just upload zip-archive of path containing workflow?

Hi!

Yep. Upload Knime exported workflow here. Take a look at this short video for exporting and importing Knime workflows if not familiar with it :wink:

https://www.knime.com/knime-introductory-course/chapter1/import-export-workflows

Br,
Ivan

1 Like

OK. Thanks for information! Here is my workflow. And If I got it right I must upload also source file (that’s fictive example, values are random).
Main problem position in my example is Bucket0/Car_Loan.
Example.knwf (8.4 KB)
Example file.xlsx (383.8 KB)

1 Like

Hi!

Column Rename node actually doesn’t transform your column to Long and there is the problem. Don’t use it for data type change :wink:

Instead of Column Rename node use Column Expressions node (available from 3.6 version and need to install it from Knime extensions) or String Manipulation node. Both of them have toLong() function which does the job.

To check your column data type go on Spec - Columns: x tab under node results. You can compare data type in Column Rename and above mentioned nodes and see the difference.

Workflow is attached.

Example.knwf (13.9 KB)

Br,
Ivan

1 Like

Thank you! It works.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.