As a developer, you've been there. You're integrating with a new API, and the JSON it returns is... let's call it "opinionated." Keys are in snake_case, but your entire stack is camelCase. Usernames are split into first_name and last_name, but your database needs a single fullName. Dates are in a format you've never seen before.
What's the next step? You sigh, crack your knuckles, and start writing a utility function. You loop through keys, write string manipulation logic, and map the old object to a new one. It works. But it's tedious, brittle, and another piece of custom code to maintain. If the source API changes a key, your script breaks.
What if you could skip all that? What if you could transform data by simply describing the result you want?
Manipulating data structures, especially JSON, is a fundamental part of software development. We write countless scripts and functions to perform tasks like:
While libraries like Lodash or jq can help, you're still writing imperative code. You're spelling out how to perform the transformation step-by-step. This approach is not only time-consuming but also creates rigid logic that's hard to adapt.
Enter the world of AI-powered agents. Instead of writing a script that details how to get from A to B, you can simply provide the input data and a set of plain English instructions that describe your desired output.
This is the core philosophy behind transform.do. We provide intelligent agents that handle complex data manipulation through a single, powerful API. You focus on the what, and our agents figure out the how.
Let's revisit our initial problem: converting snake_case keys to camelCase and combining name fields.
Here’s how you’d solve it in seconds with transform.do:
import { Agent } from '@do-sdk/agent';
const transformAgent = new Agent('transform.do');
const rawData = {
user_id: 123,
first_name: 'Jane',
last_name: 'Doe',
email_address: 'jane.doe@example.com',
joinDate: '2023-10-27T10:00:00Z'
};
const transformedData = await transformAgent.run({
input: rawData,
instructions: 'Rename keys to camelCase and combine first/last name into a single "fullName" field.'
});
// transformedData equals:
// {
// userId: 123,
// fullName: 'Jane Doe',
// emailAddress: 'jane.doe@example.com',
// joinDate: '2023-10-27T10:00:00Z'
// }
Let's break down what just happened:
No loops. No string splitting. No manual key mapping. Just a clear, readable instruction. This is Data as Code, where your business logic is captured in a simple, maintainable format.
The power of natural language transformation extends far beyond simple cosmetic changes. Our AI agents can handle a vast range of data manipulation tasks.
Need to flatten a deeply nested JSON response or group a flat list into a nested structure?
Dealing with messy, user-generated content or inconsistent API outputs?
Need to move data between formats? While the platform is native to JSON, the agents can process and output different formats.
Create new, valuable data from existing fields.
While these examples are powerful for on-the-fly transformations within your application, transform.do truly shines as a component in modern data pipelines. It's the perfect, intelligent replacement for the 'T' (Transform) step in ETL/ELT workflows.
Instead of maintaining brittle Python scripts or complex SQL transformations, you can build a flexible pipeline where the transformation logic is a simple, version-controllable instruction string passed via an API call. When requirements change, you don't redeploy code—you just update the instruction.
Q: What kind of data transformations can transform.do handle?
A: Our AI agents can perform a wide range of transformations, including format conversion (e.g., CSV to JSON), data cleaning (e.g., removing duplicates, standardizing values), restructuring (e.g., nesting objects, renaming keys), and data enrichment by combining or deriving new fields.
Q: How do I specify the transformation logic?
A: You provide the transformation logic through simple, natural language instructions in your API call. For more complex or repeatable tasks, you can define a 'Service-as-Software' workflow that encodes your exact business logic for consistent results.
Q: Is transform.do suitable for large-scale ETL pipelines?
A: Yes. transform.do can be a powerful component in modern ETL/ELT pipelines. It excels at the 'T' (Transform) step, allowing you to build flexible and intelligent data processing workflows that can be triggered via API calls, replacing brittle custom scripts.
Your time as a developer is too valuable to spend writing boilerplate data-wrangling code. By leveraging the power of AI and natural language, you can simplify complexity, accelerate development, and build more resilient systems.
Ready to transform your data on demand? Visit transform.do to learn more and see how our AI agents can revolutionize your workflow.