Icon

Exercise2

<p><strong>Chapter 2/Exercise 2</strong></p><p>This exercise reads the dataset <em>cars-85</em> from the <em>KCBBook.sqlite</em> database, prepared in Chapter2/Exercise 1. The goal is to read data from a database and practice a bit of in-database processing with database nodes and SQL queries.</p><p>To read the database start with a connector node, either the generic <em>DB Connector</em> node or the dedicated <em>SQLite Connector</em> node.</p><p>Pre-process the dataset with database nodes or SQL queries as follows:</p><ol><li><p>Exclude "symboling" and "normalized losses".</p></li><li><p>Keep only BMW and Audi cars.</p></li></ol><p><strong>Note:</strong> The generic <em>DB Connector</em> node requires an absolute file path to the <em>KCBBook.sqlite</em> file. Adjust the Database URL in the node configuration as follows: <em>jdbc:sqlite://</em><strong><em>&lt;path to KCBBook.sqlite&gt;</em></strong>.</p>
Annotations and comments
  • Workflow: Chapter 2/Exercise 2 This exercise reads the dataset cars-85 from the KCBBook.sqlite database, prepared in Chapter2/Exercise 1. The goal is to read data from a database and practice a bit of in-database processing with database nodes and SQL queries. To read the database start with a connector node, either the generic DB Connector node or the dedicated SQLite Connector node. Pre-process the dataset with database nodes or SQL queries as follows: Exclude "symboling" and "normalized losses". Keep only BMW and Audi cars. Note: The generic DB Connector node requires an absolute file path to the KCBBook.sqlite file. Adjust the Database URL in the node configuration as follows: jdbc:sqlite://<path to KCBBook.sqlite>.
  • Accessing database
  • Note: Adjust the Database URL as follows: jdbc:sqlite://<path to KCBBook.sqlite>
  • Generic connector to SQLite DB KCBBook.sqlite
  • SELECT all columns from cars85 WHERE make = "bmw" OR make = "audi"
  • Select make = "bmw" OR make = "audi"
  • SELECT * from cars85
  • SELECT * from cars85 WHERE make = "bmw" OR make = "audi"
  • Connect to SQLite DB KCBBook.sqlite

Nodes

Extensions

Links