Skip to content

Commit ee8a6fa

Browse files
committed
Update readme
1 parent 8369ab0 commit ee8a6fa

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

Diff for: README.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ provides out-of-the-box support for the following databases:
99
* [MySQL](https://www.mysql.com/)
1010
* [MariaDB](https://mariadb.org/)
1111
* [PostgreSQL](https://www.postgresql.org/)
12+
* [SQLite](https://www.sqlite.org/index.html)
13+
* [DuckDB](https://duckdb.org/)
1214

1315
NOTE: THIS IS A PREVIEW TECHNOLOGY, FEATURES AND CONFIGURATION SETTINGS CAN CHANGE IN FUTURE RELEASES.
1416

@@ -20,7 +22,7 @@ Make sure to have Nextflow 21.08.0 or later. Add the following snippet to your `
2022

2123
```
2224
plugins {
23-
id 'nf-sqldb@0.1.0'
25+
id 'nf-sqldb@0.2.0'
2426
}
2527
```
2628
@@ -95,13 +97,14 @@ NOTE: the target table (e.g. `SAMPLE` in the above example) must be created ahea
9597

9698
The following options are available:
9799

98-
| Operator option | Description |
99-
|--- |--- |
100+
| Operator option | Description |
101+
|--- |--- |
102+
| `db` | The database handle. It must must a `sql.db` name defined in the `nextflow.config` file.
100103
| `into` | The database table name into with the data needs to be stored.
101104
| `columns` | The database table column names to be filled with the channel data. The column names order and cardinality must match the tuple values emitted by the channel. The columns can be specified as a `List` object or a comma-separated value string.
102105
| `statement` | The SQL `insert` statement to be performed to insert values in the database using `?` as placeholder for the actual values, for example: `insert into SAMPLE(X,Y) values (?,?)`. When provided the `into` and `columsn` parameters are ignored.
103-
| `db` | The database handle. It must must a `sql.db` name defined in the `nextflow.config` file.
104-
106+
| `batch` | The number of insert statements that are grouped together before performing the SQL operations (default: `10`).
107+
| `setup` | A SQL statement that's executed before the first insert operation. This is useful to create the target DB table. NOTE: the underlying DB should support the *create table if not exist* idiom (i.e. the plugin will execute this time every time the script is run).
105108

106109
## Query CSV files
107110

@@ -130,6 +133,17 @@ To query this file in a Nextflow script use the following snippet:
130133
```
131134

132135

133-
The `CSVREAD` function provided by the H2 database engine allows access of a CSV file in your computer file system,
136+
The `CSVREAD` function provided by the H2 database engine allows the access of a CSV file in your computer file system,
134137
you can replace `test.csv` with a CSV file path of your choice. The `foo>=2` condition shows how to define a filtering
135138
clause using the conventional SQL WHERE constrains.
139+
140+
## Important
141+
142+
This plugin is not expected to be used to store and access a pipeline status in a synchronous manner during the pipeline
143+
execution.
144+
145+
This means that if your script has a `sqlInsert` operation followed by a successive `fromQuery` operation, the query
146+
may *not* contain previously inserted data due to the asynchronous nature of Nextflow operators.
147+
148+
The SQL support provided by this plugin is meant to be used to fetch DB data from a previous run or to populate DB tables
149+
for storing or archival purpose.

0 commit comments

Comments
 (0)