Get startedGet started for free

Accessing data in KNIME Analytics Platform

1. Accessing data in KNIME Analytics Platform

Let’s have a look at different options for data access in KNIME Analytics Platform. You can access different file types with dedicated reader nodes. They all share a bunch of configuration options. For example, you always need to select the file that you want to read. In the first menu, select “Relative to” and “Current workflow”. Then browse to the file that you want to read. In the same way, you could also indicate a path relative to the current workspace or an absolute path, according to your use case. Note that you could also select a file in the current workflow data folder. Those are the files saved within your workflow. For simplicity, we won’t explore this option in this example. If your files are stored on a remote location, such as Google Drive, Sharepoint, Box and so on, you can provide the connection to this service to the reader node. When you open its configuration window, you will be able to browse the remote file system and find your file there. Different file types, however, require different settings. For example, the CSV Reader node lets you select the character that delimits the rows (comma, hyphen and so on), and indicate if the first row has column headers. In the Excel Reader node on the other hand, you can select the sheet that you want to read and indicate if some rows or columns should be skipped. Reader nodes also let you read multiple files of a folder. Select the option and indicate the path to the folder. All the files will be read and concatenated into the same table. You also have the option to filter some of the files according to their name or extension. What about reading from a database? KNIME offers a bunch of nodes to connect and read from a variety of databases. Keep in mind that those nodes are not part of the “Starter Perspective”, so make sure to disable it if you want to see them in the Node Repository. Just click the button, select All nodes and apply the changes. Now you will be able to see the complete list of nodes, including the database ones. The first node that you need is a database Connector node. There are many of them, to connect to multiple databases. For this example, we will connect to a PostgreSQL database with the dedicated node. Select the location, the database name and provide the credentials for the authentication. Then, select a table of your database with a DB Table Selector node. Insert the name of the schema and the table. Click the button to browse the available tables in the database. You can perform any kind of operation with the DB dedicated nodes. This will build an SQL query to filter, group and sort the selected data. Once you are done, use a DB Reader node to execute the query and read the selected data into the workflow. Note that, until the execution of the DB Reader node, no data is fetched from the database. You now know how to read data from different sources in KNIME Analytics Platform. Move to the exercise to try it out yourself!

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.