August 15, 2023

tCosmosDBInput – Docs for ESB 6.x

tCosmosDBInput

Retrieves certain documents from a Cosmos database collection by supplying a query
document containing the fields the desired documents should match.

tCosmosDBInput Standard properties

These properties are used to configure tCosmosDBInput running in the Standard Job framework.

The Standard
tCosmosDBInput component belongs to the Cloud and the Databases families.

The component in this framework is available when you are using one of the Talend solutions with Big Data.

Basic settings

Use existing connection

Select this check box and in the Component
List
click the relevant connection component to reuse the connection
details you already defined.

API

Select the database API to be used. Then the corresponding parameters to be defined are displayed in the Component view.

In the current version of this component, only the MongoDB API is supported. For this reason, MongoDB database is often mentioned in the documentation of the CosmosDB components.

Use replica set address or multiple query routers

Select this check box to show the Server
addresses
table.

In the Server addresses
table, define the sharded MongoDB databases or the MongoDB replica sets
you want to connect to.

Server and Port

Enter the IP address and listening port of the database
server.

Available when the Use replica set
address or multiple query routers
check box is not
selected.

Database

Enter the name of the MongoDB database to be connected to.

Set read preference

Select this check box and from the Read preference
drop-down list that is displayed, select the member to which you need to direct the read
operations.

If you leave this check box clear, the Job uses the default Read preference, that is to
say, uses the primary member in a replica set.

For further information, see MongoDB’s documentation about Replication and its Read
preferences.

Authentication mechanism

Among the mechanisms listed on the Authentication mechanism
drop-down list, the NEGOTIATE one is recommended if
you are not using Kerberos, because it automatically select the authentication mechanism
the most adapted to the MongoDB version you are using.

For details about the other mechanisms in this list, see MongoDB Authentication from the MongoDB
documentation.

Set Authentication database

If the username to be used to connect to MongoDB has been created in a specific
Authentication database of MongoDB, select this check box to enter the name of this
Authentication database in the Authentication database
field that is displayed.

For further information about the MongoDB Authentication database, see User Authentication database.

Username and Password

DB user authentication data.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

Available when the Use
authentication
check box is selected.

If the security system you have selected from the Authentication mechanism drop-down list is Kerberos, you need to
enter the User principal, the Realm and the KDC
server
fields instead of the Username and the Password
fields.

Collection

Name of the collection in the database.

Schema and Edit
Schema

A schema is a row description. It defines the number of fields (columns) to
be processed and passed on to the next component. The schema is either Built-In or stored remotely in the Repository.

Click Edit schema to make changes to the schema.
If the current schema is of the Repository type, three
options are available:

  • View schema: choose this option to view the
    schema only.

  • Change to built-in property: choose this
    option to change the schema to Built-in for
    local changes.

  • Update repository connection: choose this
    option to change the schema stored in the repository and decide whether to propagate
    the changes to all the Jobs upon completion. If you just want to propagate the
    changes to the current Job, you can select No
    upon completion and choose this schema metadata again in the [Repository Content] window.

If a column in the database is a JSON document and you need to read
the entire document, put an asterisk (*) in the DB
column
column, without quotation marks around.

Query

Specify the query condition. This field is available only when you
have selected Find query from the
Query type drop-down list.

For example, type in "{id:4}" to retrieve the record
whose id is 4 from the collection specified in the Collection field.

Different from the query statements required in the MongoDB client
software, the query here refers to the contents inside
find(), such as the query here {id:4}
versus the MongoDB client query
db.blog.find({id:4}).

Mapping

Each column of the schema defined for this component represents a field of the documents
to be read. In this table, you need to specify the parent nodes of these fields, if
any.

For example, in the document reading as
follows
The
first and the last
fields have person as their parent node but the _id field does not have any parent node. So once completed, this
Mapping table should read as
follows:

Sort by

Specify the column and choose the order for the sort operation.

This field is available only when you have selected Find query from the Query type drop-down list.

Limit

Type in the maximum number of records to be retrieved.

This field is available only when you have selected Find query from the Query type drop-down list.

Advanced settings

tStatCatcher Statistics

Select this check box to collect the log data at the component
level.

No query timeout

Select this check box to prevent MongoDB servers from stopping idle
cursors at the end of 10-minute inactivity of these cursors. In this
situation, an idle cursor will stay open until either the results of
this cursor are exhausted or you manually close it using the
cursor.close() method.

A cursor for MongoDB is a pointer to the result set of a query. By
default, that is to say, with this check box being clear, a MongoDB
server automatically stops idle cursors after a given inactivity period
to avoid excess memory use. For further information about MongoDB
cursors, see https://docs.mongodb.org/manual/core/cursors/.

Enable external sort

Since the aggregation pipeline stages have a maximum memory use limit
(100 megabytes) and a stage exceeding this limit will produce errors,
when handling large datasets, select this check box to avoid aggregation
stages exceeding this limit.

For further information about this external sort, see Large sort operation with external sort.

Usage

Usage rule

As a start component, tCosmosDBInput
allows you to retrieve records from a collection in the Cosmos database
and transfer them to the following component for display or
storage.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x