rain.nodes.mongodb package#
Submodules#
rain.nodes.mongodb.database_io module#
Copyright (C) 2023 Università degli Studi di Camerino and Sigma S.p.A. Authors: Alessandro Antinori, Rosario Capparuccia, Riccardo Coltrinari, Flavio Corradini, Marco Piangerelli, Barbara Re, Marco Scarpetta
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
- class rain.nodes.mongodb.database_io.MongoCSVReader(node_id: str, connection: str, db: str, coll: str, filter: Optional[dict] = None, projection: Optional[dict] = None)[source]#
Bases:
InputNodeRead a Pandas Dataframe from a MongoDB collection.
- Parameters:
node_id (str) – The unique id of the node.
connection (str) – Hostname or IP address or Unix domain socket path of a single MongoDB instance to connect to, or a mongodb URI
db (str) – Name of the database to connect to.
coll (str) – Name of the collection to connect to.
filter (dict, default None) – A SON object specifying elements which must be present for a document to be included in the result set
projection (dict, default None) – A dict to exclude fields from the result (e.g. projection={‘_id’: False})
- dataset = None#
- class rain.nodes.mongodb.database_io.MongoCSVWriter(node_id: str, connection: str, db: str, coll: str)[source]#
Bases:
OutputNodeWrite a Pandas Dataframe into a MongoDB collection.
- Parameters:
node_id (str) – The unique id of the node.
connection (str) – Hostname or IP address or Unix domain socket path of a single MongoDB instance to connect to, or a mongodb URI
db (str) – Name of the database to connect to.
coll (str) – Name of the collection to connect to.
- dataset = None#
Module contents#
Copyright (C) 2023 Università degli Studi di Camerino and Sigma S.p.A. Authors: Alessandro Antinori, Rosario Capparuccia, Riccardo Coltrinari, Flavio Corradini, Marco Piangerelli, Barbara Re, Marco Scarpetta
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.