yakshavingdevs / datadance

Transforming JSON data using JSON output specification
https://datadance.app
MIT License
6 stars 3 forks source link
data-transformation deno jexl json json-transform json-transformation mozjexl typescript
Datadance Logo

Datadance

Simple, open-source JSON data transformation tool

Playground • API Reference • Docs

license version

DataDance is a versatile data processing package that makes handling JSON transformations straightforward and efficient. Our package accepts JSON input and allows you to define transformations using a code-like format. Provide your data and transformation rules, and DataDance will process them to deliver the desired output.


Install

Install DataDance from npm:

npm install datadance

Then you can import it in your code :

import { transform } from "datadance";

or

const datadance = require("datadance");
const transform = datadance.transform;

You can use the transform method :

async function test() {
    var res = await transform({
        input: { x: 2 },
        transforms: [{ x: "input.x+8" }],
        settings: {
            merge_method: "overwrite",
        },
    });
    console.log(res); // { x : 10 }
}
test();

Local Setup

Where Datadance Shines?

In many ETL pipeline scenarios, executing third-party or user-provided code can be both an operational and security challenge. Managing and isolating this code often becomes a complex task. DataDance solves this problem by offering a unique solution where third-party or user logic is expressed as DataDance transforms. These transforms are easy to maintain and eliminate the need for a traditional programming language shell. Internally, DataDance uses a parser that executes the specified transforms on the input JSON and produces an output JSON, ensuring both simplicity and security.

Internals

CLI

Example

Contributing

Development of Datadance happens in the open on GitHub. You can read the contributing guide here : CONTRIBUTING.md.

License

MIT