Up: Component summary Component

SQLSelect

Executes an SQL query and returns its results as a CSV file.

Version 1.1
Bundle microarray
Categories Data Import
Authors Marko Laakso (Marko.Laakso@Helsinki.FI)
Issue tracker View/Report issues
Requires * (jar)
Source files component.xml
Usage Example with default values

Inputs

Name Type Mandatory Description
query SQL Optional SQL select statement
queryParams CSV Optional Each row of this file represents parameters of one SQL select. Parameters should have corresponding question marks within the actual statements. Results of all queries are written to the same output.
connection Properties Optional Database connection can be defined using this file. The definition of parameters: database.url, database.timeout, database.recycle, and database.driver can be found from the documentation of Korvasieni.

Outputs

Name Type Description
table CSV Output relation returned by the select

Parameters

Name Type Default Description
columns string "" A comma separated list of column names that will be used from the queryParams. An empty string will utilize all columns in their declaration order.
defaultQuery string "" SQL select that will be used if query input has not been defined
listCols string "" A comma separated list of column names consisting of comma separated values. These values are often used together with operators such as IN.

Test cases

Test case Parameters IN
query
IN
queryParams
IN
connection
OUT
table
case1 (missing) query (missing) connection table
case2 (missing) query queryParams connection table
case3 (missing) query queryParams connection table
case4 properties (missing) queryParams connection table

defaultQuery = SELECT DISTINCT gene_id FROM gene WHERE (status LIKE ?) AND (gene_id IN (?)) AND (is_current = ?) AND (seq_region_strand IN (?)),
columns = status,geneIDs,is_current,strand,
listCols = strand,geneIDs


Generated 2019-02-08 07:42:11 by Anduril 2.0.0