RANK variable in DB

Hello,

I would like to know if there is any node that allow me the create a rang variable in a DB and not in local.

Thanks in advance

Hello @chanoufi_marwa,

and welcome to KNIME Community!

Can you explain a bit more what do you mean by RANG variable in database? Range, rank or?

Br,
Ivan

HEllo,

Thanks for your answer :slight_smile:

I would like to say a "rank "variable

1 Like

Hello @chanoufi_marwa,

you would like to rank (add rank column) to existing database table or? Some example with data would definitely help :wink:

Br,
Ivan

yes rank column as the exple below:
image

in local we can use the RANK node but when we are on DB I don’t know if there is some thing like that or how we can parameter?

Thanks in advance

Hello @chanoufi_marwa,

I see. No, there is no “DB Rank” node. You will need to write SQL Statement to rank your data in database. You can use DB Query or DB SQL Executor node.

Br,
Ivan

1 Like

@chanoufi_marwa one way to do it is to use a Hive environment and a RANK function. Other SQL databases should also support RANK like H2 (Window Functions).

Hint: the KNIME implementation of H2 currently has the version 1.4.196. Unfortunately with H2 the RANK etc functions are only supported with version 1.4.198 or later … @ScottF might be an interesting case to update that version :slight_smile:

1 Like

Thanks @ipazin and @mlauber71 for your answers.

2 Likes

@chanoufi_marwa Thanks to @tobias.koetter’s hint there is an easy way to get the latest H2 and SQLite drivers and open up the world of window functions.

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