Icon

kn_​forum_​36135_​special_​characters

Special Characters with KNIME under Windows and MacOSX

Special Characters with KNIME under Windows and MacOSX
- the workflow is there to check at several points if the special charaters are stil there (especially for Windows 10)

library(readODS)file_location <- knime.flow.in[["v_export_ods_file"]]# Read the ODS file as a tibbleods_data <- read_ods(path = file_location, sheet = "Sayfa1", col_names = FALSE, col_types = NULL, na = "", skip = 0, formula_as_formula = FALSE, range = NULL)# Convert the tibble to a data.frameknime.out <- as.data.frame(ods_data) library(arrow)library(RSQLite)library(foreign)library(readr)file_location <- knime.flow.in[["v_path_csv_file"]]# https://readr.tidyverse.org/reference/read_delim.html# enter the correct delimiter like , comma ; semicolon, | pipedf <- as.data.frame(read_delim(file_location, delim=";", col_names = FALSE))# ----- location of SQLite Database# define some basic variablesvar_loc_sqlite <- paste0(knime.flow.in[["var_path_data"]], "db.sqlite")con = dbConnect(drv=RSQLite::SQLite(), dbname=var_loc_sqlite)dbWriteTable(con, "test_file", df, overwrite = TRUE)# export as ARFF filevar_loc_arff <- knime.flow.in[["v_path_arff_file"]]write.arff(df, var_loc_arff, eol = "\n")# export file as parquetvar_loc_parquet <- knime.flow.in[["v_path_parquet_file"]]write_parquet(df, var_loc_parquet)# bring data back to KNIMEknime.out <- dfdbDisconnect(con) Special Characters with KNIME under Windows and MacOSX- the workflow is there to check at several points if the special charaters are stil there (especially for Windows 10) Initial data from example (forum) test_s.xlsx data.txt test_s.csvঅটোমোবাইল এবং স্বয়ংক্রিয় যন্ত্রাংশ ऑटोमोबाइल और ऑटो पार्ट्स 자동차 및 자동차 부품 Gépkocsik és autóalkatrészek Bílar og sjálfvirkar hlutarঅটোমোবাইল ऑटोमोबाइल 자동차 Gépkocsik Bílarঅটো ऑटो 자동으로 Autó Sjálfkrafaস্বয়ংক্রিয় যন্ত্রাংশ ऑटो भाग 자동차 부품 AUTÓ ALKATRÉSZEK BÍLAVARAHLUTIRঅটোমোবাইল অংশ ऑटोमोबाइल पार्ट्स 자동차 부품 Gépkocsik részei Bílar hlutarঅটোমোবাইল ऑटोमोबाइल 자동차 Gépkocsik Bílar library(arrow)library(foreign)df <-as.data.frame(read_parquet(knime.flow.in[["v_path_parquet_file"]]))knime.out <- df source files test_s.xlsxmanual copydata.txtv_export_ods_file/data/test_s.oddata_txt_file_reader_complex.tableread Parquet file, again ....knime://knime.workflow/data/db.sqlitedefault.test_fileknime://knime.workflow/data/test_file.arffread CSV file andexport to KNIME, SQLite and ARFFv_path*test_s_utf_16le.csvv_path_csv_filetest_s.csvtest_s_csv_file_reader_complex.tabletest_s.csvv_path_parquet_filetest_s_utf_16le.csvv_path*v_path_arff_filelocate and create/data/ folderwith absolute pathsknime://knime.workflow/data/test_file.parquet Excel Reader Table Creator File Reader(Complex Format) Java EditVariable (simple) R Source (Table) Table Writer R Source (Table) SQLite Connector DB Table Selector DB Reader ARFF Reader R Source (Table) String to Path(Variable) CSV Writer Java EditVariable (simple) File Reader(Complex Format) Table Writer CSV Reader Java EditVariable (simple) Table Reader CSV Reader String to Path(Variable) Java EditVariable (simple) Table Reader Collect LocalMetadata Parquet Reader library(readODS)file_location <- knime.flow.in[["v_export_ods_file"]]# Read the ODS file as a tibbleods_data <- read_ods(path = file_location, sheet = "Sayfa1", col_names = FALSE, col_types = NULL, na = "", skip = 0, formula_as_formula = FALSE, range = NULL)# Convert the tibble to a data.frameknime.out <- as.data.frame(ods_data) library(arrow)library(RSQLite)library(foreign)library(readr)file_location <- knime.flow.in[["v_path_csv_file"]]# https://readr.tidyverse.org/reference/read_delim.html# enter the correct delimiter like , comma ; semicolon, | pipedf <- as.data.frame(read_delim(file_location, delim=";", col_names = FALSE))# ----- location of SQLite Database# define some basic variablesvar_loc_sqlite <- paste0(knime.flow.in[["var_path_data"]], "db.sqlite")con = dbConnect(drv=RSQLite::SQLite(), dbname=var_loc_sqlite)dbWriteTable(con, "test_file", df, overwrite = TRUE)# export as ARFF filevar_loc_arff <- knime.flow.in[["v_path_arff_file"]]write.arff(df, var_loc_arff, eol = "\n")# export file as parquetvar_loc_parquet <- knime.flow.in[["v_path_parquet_file"]]write_parquet(df, var_loc_parquet)# bring data back to KNIMEknime.out <- dfdbDisconnect(con) Special Characters with KNIME under Windows and MacOSX- the workflow is there to check at several points if the special charaters are stil there (especially for Windows 10) Initial data from example (forum) test_s.xlsx data.txt test_s.csvঅটোমোবাইল এবং স্বয়ংক্রিয় যন্ত্রাংশ ऑटोमोबाइल और ऑटो पार्ट्स 자동차 및 자동차 부품 Gépkocsik és autóalkatrészek Bílar og sjálfvirkar hlutarঅটোমোবাইল ऑटोमोबाइल 자동차 Gépkocsik Bílarঅটো ऑटो 자동으로 Autó Sjálfkrafaস্বয়ংক্রিয় যন্ত্রাংশ ऑटो भाग 자동차 부품 AUTÓ ALKATRÉSZEK BÍLAVARAHLUTIRঅটোমোবাইল অংশ ऑटोमोबाइल पार्ट्स 자동차 부품 Gépkocsik részei Bílar hlutarঅটোমোবাইল ऑटोमोबाइल 자동차 Gépkocsik Bílar library(arrow)library(foreign)df <-as.data.frame(read_parquet(knime.flow.in[["v_path_parquet_file"]]))knime.out <- df source files test_s.xlsxmanual copydata.txtv_export_ods_file/data/test_s.oddata_txt_file_reader_complex.tableread Parquet file, again ....knime://knime.workflow/data/db.sqlitedefault.test_fileknime://knime.workflow/data/test_file.arffread CSV file andexport to KNIME, SQLite and ARFFv_path*test_s_utf_16le.csvv_path_csv_filetest_s.csvtest_s_csv_file_reader_complex.tabletest_s.csvv_path_parquet_filetest_s_utf_16le.csvv_path*v_path_arff_filelocate and create/data/ folderwith absolute pathsknime://knime.workflow/data/test_file.parquet Excel Reader Table Creator File Reader(Complex Format) Java EditVariable (simple) R Source (Table) Table Writer R Source (Table) SQLite Connector DB Table Selector DB Reader ARFF Reader R Source (Table) String to Path(Variable) CSV Writer Java EditVariable (simple) File Reader(Complex Format) Table Writer CSV Reader Java EditVariable (simple) Table Reader CSV Reader String to Path(Variable) Java EditVariable (simple) Table Reader Collect LocalMetadata Parquet Reader

Nodes

Extensions

Links