Importing data

There are many options to import data to a report. For example, you can use SQL databases and access them through JDBC; however, you can also use this feature to import KNIME nodes' exported tabular content with a proper JDBC driver, although this is not the recommended way.

The Data menu can be used to create a new data set, data cube, or data source.

Sending data and images to a report

The first thing you might notice after the install is that you have a new category named Reporting with two new nodes within Node Repository. The Data to Report node brings a table to the report as a data source and creates a data set for it.

There are not many configuration options here; one is where you can set how images within the table should be handled. For example, an image can be resized to a fixed size. Here, ideally the best option would be to use SVG, although using SVG is a bit harder. The node description gives a detailed description on how to use them; however, unfortunately, the preview does not support the rendering of SVG images, so you will need to generate them to check for the results.

Note

In reporting, the combination of different tables is a bit more limited, so it might be necessary to combine the tables to a denormalized table too.

The date and time data columns are imported as strings, so in the designer, you will need to change that to Date, Date Time, or Time. When the data is an image, it is not automatically represented as an image. It is imported as a blob that stands for a large binary object. You need to use report items for those supporting images.

Tip

Dates

Because the dates are imported as a string, you have to create a computed column if you prefer to use them as a date. For cubes, this is a strongly recommended transformation to do.

The Image to Report node acts similar to the Data to Report node, although it makes only a single image available in the report designer from an image port object.

The preferences for the Image to Report node are similar to the Data to Report node's preferences and works in the same way.

Importing from other sources

When it comes to data presentation, you might want to enrich the data from another source to make it more up-to-date, or just import a table structure file already processed with KNIME or exported from KNIME.

There are multiple ODA (Open Data Access) data source importer extensions available for BIRT. So, besides the default options, you can import from other reports or different services.

Note

Check the BIRT exchange marketplace at http://www.birt-exchange.com/be/marketplace/app-listing/ for the BIRT emitter or ODA extensions besides the BIRT-related section of the eclipse marketplace at http://marketplace.eclipse.org/category/categories/birt.

The default data providers include: the flat file, JDBC, KNIME, scripted, and XML source support.

To import a new data source, you have to open a view showing the Data Explorer or the Outline view. Then, you can select the New Data Source option from the context menu.

From the data source, you can create data sets; using the context menu of Data Sets, select the New Data Set menu item.

With flat files, you can import files separated by a comma (CSV), space (SSV), tab (TSV), or pipe (|, PSV (pipe separated values)). When the type of the columns is specified in the second row, it can parse the input accordingly. You can import data locally or from a URI.

With the JDBC Data Source, you have to specify the connection settings, and then you can use that data source to import tables, such as data sets. You can also bind the connection settings or use a connection profile store. An example data source is also available; you can check the BIRT tutorial about its usage at:

http://www.eclipse.org/birt/phoenix/tutorial/basic/basic04.php

You cannot add another KNIME Data Source, although one is enough to get multiple tables imported. Therefore, it is not necessary either.

With a Scripted Data Source, you can compute and import data using JavaScript; for example, using RESTful services with JSON results are well suited for this kind of data source.

The XML Data Source can be used to import XML files with a schema. The schema is optional, although useful to have. In the associated data sets, you can define the columns using XPath expressions.

Joining data sets

When you have multiple but possibly semantically connected data sets, you might want to connect them. You just need to create a new data set by selecting the New Joint Data Set menu item from the context menu of Data Sets.

There you have to select the columns you want to join, and the way you want to connect them: Inner Join, Left Outer Join, Right Outer Join, and Full Outer Join. After that you will be asked to set further options, such as the output or computed columns, the parameters of the data set, and the possible filters. You also have an option to preview the resulting data set.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.137.59