> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/process-node-parts/interpolate-query.md).

# Interpolate Query

## Description

You can use the *Interpolate Query* part to auto-fill (interpolate) data object values into a SQL-oriented string. This part has more SQL features than the *Interpolate String* part.

## Use

This part is not directly accessible from the Designer. However, you can add a process node, select any other part from the Designer menu, and go to the *Code* tab. Change the \_name value to *interpolate\_query* and save your changes.

The interpolation searches for SQL binding parameters (:param, :param:, @param, @param@, ?param, ?param?, #param, #param#) or the MS SQL Server Management Studio templates <*PARAM*, *data type*, *default*>. They system extracts PARAM and drops the data type and default value.

The system then performs a lookup for each param found and replaces it with the found path if you have specified the *Column mapping* object. Additionally, the part obtains the corresponding data type from the *Column data type* object if you have specified it. The data type determines if the system adds quotation marks to the object value. If the system does not find the actual object value, it inserts/interpolates NULL. If the value of a text object is 'NuLLeD' the system also inserts/interpolates NULL.

## Editor Fields

| Field Name          | Description/Use                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Type/Options        | Optional/Mandatory |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- | ------------------ |
| Path                | This is the path to the object into which the system will save the resulting SQL string.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Data Object         | Mandatory          |
| SQL query           | This is the source query that will be interpolated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Text \| Data Object | Mandatory          |
| Column mapping      | This is the key-value collection that contains the mapping between the column names and the object paths. The column name is the key, the object path is the value in the collection. The column names are detected when specified in the parameter template or as parameter name. If not specified, the system will perform plain interpolation.                                                                                                                                                                                                                                                                                                                                                                                                                              | Data Object         | Optional           |
| Column data types   | <p>This is a key-value collection that contains the mapping between the column names and the object data types. The column name is the key and the object data type is the path in the collection. Supported data types:<br>- <strong>text</strong> - Default data type, will force single quotes to be interpolated around the actual value. If the data object is empty, NULL is interpolated.<br>- <strong>number</strong> - Object value is interpolated without adding any single quotes.<br>- <strong>plain</strong> - Data object value is interpolated as is. This allows deeper interpolated strings to be specified as values, for example to be used to build dynamic WHERE clauses.<br>- <strong>json</strong> - Converts the object value into a JSON string.</p> | Data Object         | Optional           |
| Interpolation scope | This is the root container from which the system interpolates the data object paths. Leave this empty or set to *local* to use the normal context (ctx), set to *global* to use the global context (gctx) for the situation when running in a sub-scoped call-node, or set it to a specific data object to be used (implicitly expected as an object within the local context scope or falling back to the global context scope).                                                                                                                                                                                                                                                                                                                                              | Data Object         | Optional           |

## Example

Download and import the following example project in your workspace. TBA.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/process-node-parts/interpolate-query.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
