Data Transformation FAQ in Qntrl | JSON Conversion, Dataset, Date & Time Troubleshooting | Qntrl Circuit Online Help

Troubleshooting FAQs - Data Transformation States

1. When should I use a Data Transformation state instead of a Function state?

Use Data Transformation states when the required logic can be achieved using built-in capabilities such as JSONata, JSLT, or dataset operations. This helps avoid custom scripting, improves maintainability, and keeps circuits cleaner.


JSON Conversion 

2. How do I choose between JSONata and JSLT for JSON-to-JSON transformations?

  • Use JSONata for flexible querying, filtering, and quick transformations.
  • Use JSLT for structured, template-based transformations with clear input-output mapping.

3. What happens if I provide both inline data and a file ID in JSON-to-JSON?

The Qntrl File ID takes precedence over inline input data.

4. When should I use regex-based TXT parsing instead of delimiter-based parsing?

Use regex-based parsing for logs or semi-structured text where fields do not follow a consistent delimiter pattern.


5. How do I handle inconsistent or malformed data during file-to-JSON conversion?

Use NA Values and Null Substitute fields, and define appropriate parsing rules, especially for CSV and TXT files.


6. What happens if the encoding type is incorrect during file conversion?

The file may fail to load or produce incorrect output. Ensure the encoding type is correct (UTF-8 by default).


Dataset

7. How does “Remove Duplicates” behave when no keys are specified?

It compares entire objects and removes exact duplicates, retaining only the first occurrence.

8. When should I use “Exclude” in duplicate removal?

Use Exclude when certain fields (such as timestamps or IDs) should be ignored while identifying duplicates.

Date & Time

9. What are the default input and output settings for Date & Time states?

  • Format: yyyy-MM-dd'T'HH:mm:ss
  • Language & Region: en-US
  • Timezone: UTC


10. When should I use “Difference” vs “Extract Duration”?

  • Difference → Calculates the time gap between two date/time values
  • Extract Duration → Breaks a duration into components such as hours or minutes


11. How can I use the current time dynamically within a circuit?

Use the Current Datetime state with Include Time enabled to generate runtime timestamps for logging, auditing, or time-based conditions.