Copytomongodb¶
flowtask.components.CopyToMongoDB
¶
CopyToMongoDB
¶
Bases: CopyTo, PandasDataframe
CopyToMongo.
Overview This component allows copying data into a MongoDB collection, using write functionality from AsyncDB MongoDB driver.
.. table:: Properties :widths: auto
+--------------+----------+-----------+--------------------------------------------+ | Name | Required | Summary | +--------------+----------+-----------+--------------------------------------------+ | tablename | Yes | Name of the collection in | | | | MongoDB | +--------------+----------+-----------+--------------------------------------------+ | schema | Yes | Name of the database | | | | where the collection is located | +--------------+----------+-----------+--------------------------------------------+ | truncate | Yes | If true, the collection will be emptied | | | | before copying new data | +--------------+----------+-----------+--------------------------------------------+ | use_buffer | No | When activated, optimizes performance | | | | for large volumes of data | +--------------+----------+-----------+--------------------------------------------+ | key_field | No | Field to use as unique identifier | | | | for upsert operations | +--------------+----------+-----------+--------------------------------------------+
Example:
```yaml
CopyToMongoDB:
schema: hisense
tablename: product_availability
dbtype: documentdb
```