MongoDB Input

  • Last update: November 28, 2024
  • Overview

    Version

    FineDataLink VersionFunctional Change

    4.0.4.2

    • Supported connection to the MongoDB database.

    • Added the MongoBD Input operator in the Data Transformation node, enabling you to fetch data from a specified MongoDB collection with queries.

    Application Scenario

    You may need to use FineDataLink to process data in the MongoDB database.

    Function Description

    This function allows you to fetch data from the MongoDB data source for processing.

    Prerequisite

    1. Before using this function, ensure that the NoSQL function point has been registered in FineDataLink. For details, see Registration Introduction.

    2. You have created a MongoDB data connection.

    Function Description

    The MongoDB Input operator allows you to read data from a MongoDB collection, as shown in the following figure.

    For details about how to process the fetched data, see Overview of Scheduled Task.

     2024-11-28_16-23-09.png

    The following table describes the setting items.

    Setting ItemDescription

    Data Connection

    The drop-down list displays existing MongoDB data connections on which you have Use permission.

    Database

    The drop-down list displays all the databases connected via the selected data connection.

    Connection

    The drop-down list displays all the collections in the selected database.

    Request Type

    Only the selected configuration method takes effect, and only the query condition corresponding to the selected method is saved.

    The query condition of each request type works independently and will not be cleared if you switch the request type. The result field after the query is displayed in Output Field.

    Configure Condition

    This item is displayed when you select Conditional Query (Find).

    For details, see MongoDB Comparison Query Operators.

    Convert the time in the query expression to time in GMT.

    iconNote:
    In FineDataLink V4.1.1 and later versions, the product logic for condition judgment has been standardized. For details about each operator, see Judgment Logic Description.

    In FineDataLink V4.1.1 and later versions, the product logic for condition judgment has been standardized. For details about each operator, see Judgment Logic Description.

    You can use parameters configured in FineDataLink. For details, see Parameter Configuration and Use.

    Query Statement

    The statement input box is displayed when you select Statement Query (Find).

    Enter the query condition in JSON format, namely, the content inside the brackets of find(). Parameters are supported.

    For details, see MongoDB Document Query.

    Format:

    {key1:value1, key2:value2}

    {$or: [{key1: value1}, {key2:value2}]}

    Empty content is allowed. If the content is empty, no query condition is specified, and all documents in the collection will be queried.

    You can use parameters configured in FineDataLink. For details, see Parameter Configuration and Use.

    Aggregate Statement

    You can use the aggregate() method when selecting Statement Aggregation (Aggregate).

    Enter the aggregate query in JSON format, namely, the content inside the brackets of aggregate(). Parameters are supported.

    For details, see MongoDB Aggregation.

    Format:

    [{$group:{_id:"$by_user",num_tutorial:{$sum:1}}}]

    {$project:{_id:0,title:1,author:1}}

    Empty content is allowed. If the content is empty, no aggregation is specified.

    iconNote:

    1. The Java driver of MongoDB cannot parse new Date(“YYYY-MM-DD”) in aggregate queries. You need to replace new Date with ISODate in the aggregate queries.

    2. The LIMIT clause is supported in Statement Aggregation (Aggregate).

    You can use parameters configured in FineDataLink. For details, see Parameter Configuration and Use.

    Output Field

    You can configure the output fields.

    1. Field Name

    • The automatically acquired field names cannot be edited.

    • The field names you add can be edited but cannot be empty, contain spaces, or be duplicated with other valid field names.

    2. Field Type: You can select the field type from the drop-down list.

     

    附件列表


    主题: Data Source Configuration
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy