how to get a listing of all unique characters present in a text file

Get a listing of all unique characters present in a text file

Hi @arddashti,

so you mean if the file contains the following text:
"
ABC
DDD
ZAF
"
you want to list the following characters:
ABCDFZ
?

1 Like

That’s partly true
i want
A
B
C
D
F
Z

KNIME_project57.knwf (9.4 KB)

Hi arddashti,

how large is your file?
Else you might be able to do it the following way:
->Read the file to KNIME
->Use a Java Snippet with Array of String Output column
Then use
yourOutpoutColumn = yourTextcolumn.split("");

Then finally use ungroup and group to make them distinct
Maybe that will help for small files :slight_smile:

1 Like

this is modified for big files
Get a listing of all unique characters present in a text file.knwf (13.7 KB)

1 Like

Great - thought about how to reduce the string amount :slight_smile:
Nice solution, thanks for sharing!

1 Like

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