Icon

kn_​example_​db_​duckdb_​connection

DuckDB - toy around with KNIME and SQL

DuckDB - toy around with KNIME and SQL

Some Meta Information about the tables BEGIN TRANSACTION;;COMMIT TRANSACTION; Insert a CSV file and automatically detect headers and separator create a table by hand and empty it DuckDB - toy around with KNIME and SQL determinepath and name of workflowvar_path_csv_filevar_path_csv_filedummy dataCluster_Membershipmy_database_001.duckdb=> Disable automatic transactionCREATE SCHEMA IF NOT EXISTS myschema;BEGIN TRANSACTION;DROP TABLE IF EXISTS myschema.t1;CREATE TABLE IF NOT EXISTS myschema.t1(i INTEGER);DELETE FROM myschema.t1;COMMIT TRANSACTION;myschema.t1INSERT INTO myschema.t1 VALUES (1), (2);/data/test_file.parquetSELECT * FROM "$${Svar_path_parquet_file}$$";INSERT INTO myschema.t2 SELECT * FROM read_parquet('$${Svar_path_parquet_file}$$');myschema.t1CREATE TABLE IF NOT EXISTS myschema.t2(Universe_0_0 DOUBLE, Universe_0_1 DOUBLE, Universe_1_0 DOUBLE, Universe_1_1 DOUBLE, Cluster_Membership STRING);DELETE FROM myschema.t2;myschema.t2Empty Tablemyschema.t2Empty Tablemyschema.t2Table filled from Parquet filemyschema.t2Table filled from Parquet filemyschema.t2some calculationssee data fromParquet file/data/test_file.csvDROP TABLE IF EXISTS myschema.t3;CREATE TABLE myschema.t3 AS SELECT * FROM read_csv_auto('$${Svar_path_csv_file}$$', header=True);myschema.t3Table from CSVmyschema.t3Table from CSVSELECT * FROM information_schema.tablesSELECT * FROM information_schema.columnsmyschema.t1Emptymyschema.t1Empty Extract ContextProperties String to Path(Variable) determine paths Java EditVariable (simple) Data Generator Column Rename DB Connector DB SQL Executor DB SQL Executor DB Table Selector DB SQL Executor Parquet Writer DB Table Selector DB SQL Executor DB Query DB Reader DB SQL Executor DB Table Selector DB Reader DB Reader DB Table Selector DB GroupBy DB Reader DB Reader DB ConnectionExtractor CSV Writer DB SQL Executor DB Table Selector DB Reader DB Query Reader DB Query Reader DB Table Selector DB Reader Merge Variables Some Meta Information about the tables BEGIN TRANSACTION;;COMMIT TRANSACTION; Insert a CSV file and automatically detect headers and separator create a table by hand and empty it DuckDB - toy around with KNIME and SQL determinepath and name of workflowvar_path_csv_filevar_path_csv_filedummy dataCluster_Membershipmy_database_001.duckdb=> Disable automatic transactionCREATE SCHEMA IF NOT EXISTS myschema;BEGIN TRANSACTION;DROP TABLE IF EXISTS myschema.t1;CREATE TABLE IF NOT EXISTS myschema.t1(i INTEGER);DELETE FROM myschema.t1;COMMIT TRANSACTION;myschema.t1INSERT INTO myschema.t1 VALUES (1), (2);/data/test_file.parquetSELECT * FROM "$${Svar_path_parquet_file}$$";INSERT INTO myschema.t2 SELECT * FROM read_parquet('$${Svar_path_parquet_file}$$');myschema.t1CREATE TABLE IF NOT EXISTS myschema.t2(Universe_0_0 DOUBLE, Universe_0_1 DOUBLE, Universe_1_0 DOUBLE, Universe_1_1 DOUBLE, Cluster_Membership STRING);DELETE FROM myschema.t2;myschema.t2Empty Tablemyschema.t2Empty Tablemyschema.t2Table filled from Parquet filemyschema.t2Table filled from Parquet filemyschema.t2some calculationssee data fromParquet file/data/test_file.csvDROP TABLE IF EXISTS myschema.t3;CREATE TABLE myschema.t3 AS SELECT * FROM read_csv_auto('$${Svar_path_csv_file}$$', header=True);myschema.t3Table from CSVmyschema.t3Table from CSVSELECT * FROM information_schema.tablesSELECT * FROM information_schema.columnsmyschema.t1Emptymyschema.t1EmptyExtract ContextProperties String to Path(Variable) determine paths Java EditVariable (simple) Data Generator Column Rename DB Connector DB SQL Executor DB SQL Executor DB Table Selector DB SQL Executor Parquet Writer DB Table Selector DB SQL Executor DB Query DB Reader DB SQL Executor DB Table Selector DB Reader DB Reader DB Table Selector DB GroupBy DB Reader DB Reader DB ConnectionExtractor CSV Writer DB SQL Executor DB Table Selector DB Reader DB Query Reader DB Query Reader DB Table Selector DB Reader Merge Variables

Nodes

Extensions

Links