Extractors and Transformers
Overview
Extractors and Transformers are essential components within Dynamiq's platform that handle data transformation and extraction within your workflows. These nodes help you convert data between different formats, extract specific information using patterns, and retrieve targeted data elements to optimize your data processing tasks.

Available Extractor and Transformer nodes
All nodes require minimal configuration after being added to the workflow.
TextTemplate Node
The Text Template Node processes the provided text template containing placeholders and dynamically replaces them with the corresponding input parameters. By mapping variables to predefined placeholders, this node ensures flexible and automated text generation for various use cases, such as personalized messages, dynamic content generation, and structured data formatting.

Configuration
Name: Customizable name for identifying this node.
Template: Text structure with placeholders (e.g., { {variable_name}}) that will be dynamically replaced with input values.
Input
Input parameters are generated based on the placeholders in the provided template. For example, specifying the template below in the configuration will automatically create an input field for the 'user' variable:

Output
Content: The final text with all placeholders replaced by the corresponding input values.
Usage Example

Input:
{
"name":"John",
"order_id":"3703804"
}
Output:
{
"content":"Hello, John! Your order with ID 3703804 has been shipped."
}
Any to JSON
The Any to JSON node converts objects (e.g., lists, dictionaries, etc.) into JSON format as a string, enabling standardized data serialization for storage, transmission, or further processing.

Configuration
Name: Customizable name for identifying this node.
Input
Value: The object (e.g., list, dictionary, or other data structure) that you want to convert to JSON format.
Output
Content: The JSON string representation of the input object, formatted as a standard JSON structure.
Usage Example
Input:
{
"value": {
"name": "John Doe",
"age": 30,
"city": "New York"
}
}
{
"value": [1,2,3]
}
Output:
{
"content":"{'name': 'John Doe', 'age': 30, 'city': 'New York'}"
}
{
"content": "[1, 2, 3]"
}
JSON to Any
The JSON to Any node performs the exact opposite operation of Any to JSON, converting JSON strings back into their original object types (e.g., lists, dictionaries, etc.) for native data manipulation.

Configuration
Name: Customizable name for identifying this node.
Input
Value: The JSON string that you want to convert back to its original object format.
Output
Content: The parsed object (list, dictionary, or other data structure) converted from the JSON string input.
Usage Example
Input:
{
"value": "{"name": "John Doe", "age": 30, "city": "New York"}"
}
{
"value": "[1, 2, 3]"
}
Output:
{
"content":{
"name":"John Doe",
"age":30,
"city":"New York"
}
}
{
"content": [1, 2, 3]
}
By Regex Extractor
The By Regex Extractor node extracts data that matches specific patterns from text using regular expressions, returning a list of all matches found. This node is particularly useful for parsing structured text and extracting specific information based on defined patterns.

Configuration
Name: Customizable name for identifying this node.
Pattern: The regular expression pattern used to match and extract data from the input text. This parameter can be overridden by providing a pattern in the input parameters.
Input
Value: The text string from which you want to extract data using the specified pattern.
Pattern (optional): The regular expression pattern used to match and extract data from the input text. If provided, this will override the pattern specified in the configuration.
Output
Matches: A list of all matches found in the input text that correspond to the regular expression pattern.
Usage Example

Input:
{
"value": "My phone is 123-456-7890 and John`s is 235-552-6393"
}
Output:
{
"matches": ["123-456-7890","235-552-6393"]
}
By Index Extractor
The By Index Extractor node extracts specific elements from lists using their index position, allowing precise retrieval of data at known locations within ordered collections.

Configuration
Name: Customizable name for identifying this node.
Index: The position index of the element to extract from the input list. This parameter can be overridden by providing an index in the input parameters.
Input
Input: The list from which you want to extract an element at the specified index position.
Index (optional): The position index of the element to extract from the input list. If provided, this will override the index specified in the configuration.
Output
Output: The element extracted from the input list at the specified index position.
Usage Example
Input:
{
"input": [1, 2, 3, 4, 5],
"index": 2
}
Output:
{
"output": 3
}
File Type Extractor
The File Type Extractor node determines and extracts the type classification of files, identifying whether they are audio, video, font, presentation, or other file categories based on file metadata or passed file name.

Configuration
Name: Customizable name for identifying this node.
Input
File: The file object from which you want to determine the type classification.
Filename: The filename string used to identify the file type based on extension and metadata.
Output
Type: The classification of the file (e.g., audio, video, font, presentation, or other file categories) based on the file metadata or filename analysis.
Last updated