Count Generator

Hello team,

I’ve built a workflow to import data to a table in a mysql data base, this table has a incremental primary key, because of that I’ve included he count genarator node in order to generate the key data, but I’ve bring the initial number from the existing data in the same table by a select and included it at a variable (table row to variable), but the node count generator is not able to read this variable for any reason. Could you guys help me?

Importando txt.knwf (765.4 KB)

image

Portuguese:
Olá Pessoal,
Construi um fluxo para importar dados em uma tabela no Mysql, esta tabela tem uma chave primaria incremental, por conta disto eu inclui o node count generator para gerar esta chave sequencial, como número inicial defini o número final desta mesma tabela e guardei numa varável pelo node table Row to variable, porém por alguma razão o node count generator não está lendo está varável. podem me ajudar?

Hey @rafaelfre,

the flow variable for the min value needs to be an integer. The number you’ve read from the data base is a long. You need to convert the long into an integert first. There is no dedicated Long to Integer node, but the Double To Int will do just fine! Just put it before the Table Row To Variable node and then the variable should be available in the Counter Generation node.

Best,

Julian

3 Likes

tky so much I was looking at this simbol in variables output from Table Row to variable node, I didn’t noticed the type in DB query reader output.

tks :slight_smile:

1 Like

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