How to define number of rows for Empty Table Creator through variable?

Hi,

I need the Empty Table Creator node to generate a table with the number of rows defined by a variable that is picked up from the preceding node. However it is unclear to me which of the choices under the Flow Variables tab corresponds to the number of rows.

Is it the ‘cfg_nr’? In that case I am unsure how to change this.

Any tips appreciated/Evert

Hi!

Yes, use ‘cfg_nr’ to control number of rows. But also on Options tab you have “V” sign next to Number option where you can do the same. Just the variable has to be of type Integer :wink:

Br,
Ivan

Hi,

In the preceding node I have an integer column called ‘Max’ which in turn is generated by a preceding GroupBy node (to count the maximum number of something). Then I want to use this Max number to generate an empty table with this same number of rows.

However under the Variable setting of the Empty Table Creator node the Use Variable tick-box is greyed out and I am not able to choose the Max column to define the variable ().

Is this possibly a bug? I am using Knime 3.6.2. Attached an image of the workflow and node configuration windows, as well as the table with the Max integer. I pulled in a fresh Empty Table Creator node but this doesn’t make a difference.

Thanks/Evert!

Hi @evert.homan,
You need a variable of type Int, use the Table Row to Variable node to turn your row into a variable you can use in the Empty Table creator

best,
Gabriel

1 Like

Much better - thank you!!!

Cheers/Evert