# tMilvusInput

Retrieves records from a collection in the Milvus database and transfers them to the following component.

This component is not shipped with your Talend Studio by default. You need to install it using the Feature Manager. For more information, see [Installing features using the Feature Manager](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/install-features-to-talend-studio).

For a quick introduction on using this component in your Job, see the following video:

## tMilvusInput Standard properties

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

The Standard tMilvusInput component belongs to the Databases family.

## Basic settings

| Properties | Description |
| --- | --- |
| Use existing connection | Select this check box and in the Component<br>List drop-down list, select the desired connection component to<br>reuse the connection details you already defined. |
| Schema and Edit Schema | A schema is a row description. It defines the number of fields<br>(columns) to be processed and passed on to the next component. When you create a Spark<br>Job, avoid the reserved word line when naming the<br>fields.<br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul> |
| Collection | Enter the name of the collection in the Milvus database, or click the<br>[...] button next to the corresponding field to fetch<br>the available collections and select the desired one. |
| Operation | Select the type of operation you want to perform on the collection data:<br><br><ul> <li> <span>QUERY</span>: to specify a query using filters.</li> <li> <span>SEARCH</span>: to use vector search capabilities and                        specify the query using the <kbd>queryVector</kbd>                        property.</li> </ul><br><br>If you are using dynamic fields to specify the collection, note that the<br>QUERY mode will have a normal output, while the SEARCH mode will generate a new<br>column called $meta with all the dynamic fields in<br>it. |
| Query vector | This component supports vector search capabilities, you can use this option<br>to specify the query condition using the queryVector<br>property. This query vector should be a JSON array, or array of an array, like<br>[1,0,1,0,1] and<br>[[1,0,1],[1,0,1],[0,1,1]].<br><br>For more<br>information on vector searches in Milvus, see the corresponding [Milvus documentation](https://milvus.io/docs/single-vector-search.md#Overview).<br><br>This field is available<br>only when you have selected SEARCH from<br>the Operation drop-down<br>list. |
| Filter | Enter a query to filter on specific records in the collection data.<br><br>For<br>example, type in id &lt; 50 to retrieve the<br>records whose id is lower than 50<br>from the collection specified in the Collection field. |
| Limit and<br>Offset | <ul> <li> <span>Limit</span>: Type in the number of entities to be included                        in the search results.</li> <li> <span>Offset</span>: Type in the total number of entities that                        have already been returned.</li> </ul><br><br>For more information on these two parameters, see the corresponding [Milvus documentation](https://milvus.io/docs/single-vector-search.md#Use-Limit-and-Offset). |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStatCatcher Statistics | Select this check box to collect the log data at the component<br>level. |
| Partition | Select this check box to read data in partitions.<br><br>Enter the name, in<br>double quotation marks, of the partition column or columns of the Milvus table<br>you want to read data from, or click the [...] button<br>next to the corresponding field to select the desired ones.<br><br>If you need<br>to list several values, separate them with a comma. |
| Load collection into memory | Select this check box to load the selected collection into memory when<br>executing the Job. |

## Global Variables

| Variables | Description |
| --- | --- |
| Global Variables | NB\_LINE: the number<br>of rows read by an input component or transferred to an output component. This is an<br>After variable and it returns an integer.<br><br><br>ERROR\_MESSAGE: the error message generated by the<br>component when an error occurs. This is an After variable and it returns a string. This<br>variable functions only if the Die on error checkbox is<br>cleared, if the component has this checkbox.<br><br>A Flow variable functions during the execution of a component<br>while an After variable functions after the execution of the component.<br><br>To fill up a field or expression with a variable, press Ctrl+Space to access the variable list and choose the variable to use from<br>it.<br><br>For more information about variables, see [Using contexts and variables](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/contexts-and-variables). |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | <ul> <li>As a start component, <span>tMilvusInput</span>                        allows you to retrieve records from a collection in the Milvus database and                        transfer them to the following component for display or storage.</li> <li>You can write fields to dynamic type using the                           <span>tWriteDynamicFields</span> component, including                        List.</li> <li>HTTP and HTTPS proxies are supported with this component.</li> <li><span>tMilvusInput</span> supports query vector capabilities, you                        can use it to perform actions on vector embeddings. For more information on                        vector embeddings, see <a href="https://milvus.io/docs/single-vector-search.md" target="_blank">the corresponding Milvus documentation</a>.</li> </ul> |

**Related tasks**

* [Querying Milvus collections using vector embeddings](https://help.qlik.com/talend/en-US/components/8.0/milvus/tmilvus-components-storing-and-retrieving-product-embeddings-standard-component "The following Job demonstrates how to connect to a Milvus vector database, insert product embeddings, and retrieve similar products using vector similarity search.")