sekruse / metanome-cli

Run Metanome algorithms from the command line
http://www.metanome.de/
Apache License 2.0
7 stars 6 forks source link

ISSUE with BINDER algorithm #19

Closed faisal-ksolves closed 1 year ago

faisal-ksolves commented 1 year ago

Hello everyone, trying to run binder algorithm on two csv files sample1.csv and sample2.csv, but i dont know why cli got failed showing such error ::- java.lang.ClassCastException: class de.metanome.algorithms.binder.core.BINDER cannot be cast to class de.metanome.algorithm_integration.Algorithm (de.metanome.algorithms.binder.core.BINDER and de.metanome.algorithm_integration.Algorithm are in unnamed module of loader 'app') at de.metanome.cli.App.createAlgorithm(App.java:282) at de.metanome.cli.App.configureAlgorithm(App.java:266) at de.metanome.cli.App.run(App.java:83) at de.metanome.cli.App.main(App.java:47)

I am using the following command ::- java -cp metanome-cli-1.1.0.jar:BINDER-1.2-SNAPSHOT.jar de.metanome.cli.App -a de.metanome.algorithms.binder.core.BINDER --input-key INPUT_FILE --files load:sample1.csv,dample2.csv --header --output print

can anyone help me in this ?? thanks in advance :)

sekruse commented 1 year ago

You will need to use the class de.metanome.algorithms.binder.BINDERFile.

Moreover, the load: in the --file parameter is probably incorrect as explained here. Also, files need to be separated by spaces.

Last but not least, I believe that BINDERFile requires --input-key INPUT_FILES (note the pending S). See here for supported Metanome options.

So your command line should look as follows:

$ java -cp metanome-cli-1.1.0.jar:BINDER-1.2-SNAPSHOT.jar de.metanome.cli.App -a de.metanome.algorithms.binder.BINDERFile --input-key INPUT_FILES --files sample1.csv dample2.csv --header --output print

If you have questions about BINDER specifically, please raise them at https://github.com/HPI-Information-Systems/metanome-algorithms directly.

faisal-ksolves commented 1 year ago

this command executed without any error, which is good but didnt get any result. in the other hand when i try this algorithm on metanome web-runner it gives the following result:

# TABLES
WDC_age_2.csv   2
WDC_age.csv 1
# COLUMN
1.RotationPeriod    2
2.Life  5
1.RevolutionPeriod  3
2.Planet    4
1.Planet    1
2.Example   6
# RESULTS
1[=4
4[=1
sekruse commented 1 year ago

That sounds as if you're using different configurations in Metanome Web and Metanome CLI. The BINDER algorithm and the CSV input need to have the same configuration to yield the same results. See Parameter for available config options of the Metanome CLI.

In your concrete case, I suspect that the default CSV separator (namely ;) might be wrong. If your input files use a different separator, e.g., a comma, then you'll need to add --separator , to your command line.

faisal-ksolves commented 1 year ago

can this algorithms also write into database?

sekruse commented 1 year ago

See #20.