You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-6
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ provides out-of-the-box support for the following databases:
9
9
*[MySQL](https://www.mysql.com/)
10
10
*[MariaDB](https://mariadb.org/)
11
11
*[PostgreSQL](https://www.postgresql.org/)
12
+
*[SQLite](https://www.sqlite.org/index.html)
13
+
*[DuckDB](https://duckdb.org/)
12
14
13
15
NOTE: THIS IS A PREVIEW TECHNOLOGY, FEATURES AND CONFIGURATION SETTINGS CAN CHANGE IN FUTURE RELEASES.
14
16
@@ -20,7 +22,7 @@ Make sure to have Nextflow 21.08.0 or later. Add the following snippet to your `
20
22
21
23
```
22
24
plugins {
23
-
id 'nf-sqldb@0.1.0'
25
+
id 'nf-sqldb@0.2.0'
24
26
}
25
27
```
26
28
@@ -95,13 +97,14 @@ NOTE: the target table (e.g. `SAMPLE` in the above example) must be created ahea
95
97
96
98
The following options are available:
97
99
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.
100
103
| `into` | The database table name into with the data needs to be stored.
101
104
| `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.
102
105
| `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).
105
108
106
109
## Query CSV files
107
110
@@ -130,6 +133,17 @@ To query this file in a Nextflow script use the following snippet:
130
133
```
131
134
132
135
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,
134
137
you can replace `test.csv` with a CSV file path of your choice. The `foo>=2` condition shows how to define a filtering
135
138
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
0 commit comments