Data Integration Language

Part 2: Syntax and examples

Syntax

  • Type
  • Function
  • Parameters
type:function?parameters
<component>
<type></type>
<function></function>
<parameters>
<parameter></parameter>
<parameters>
</component>
  1. Type defines the pattern of the component and thereby the number of possible links.
  2. Function: A self-contained module that accomplishes a specific task (written in the form of a URI).
  3. Parameter: A collection of key/value pairs, that are the input parameters for a function.

Syntax examples

<flow>
<name>sample</name>
<type>inbound</type>
<options>
<transport>synchronous</transport>
</options>
<steps>
<step>
<type>source</type>
<uri>https://sample</uri>
<options>
<preserveHttpHeader>true</preserveHttpHeader>
</options>
</step>
<step>
<type>action</type>
<uri>split:xpath</uri>
<options>
<expression>/names/name</expression>
</options>
</step>
<step>
<type>action</type>
<uri>replace:myregex</uri>
</step>
<step>
<type>action</type>
<uri>aggregate:xml</uri>
</step>
<step>
<type>sink</type>
<uri>sql:myquery</uri>
<options>
<database>mysql</database>
<username>example</username>
<host>xx</host>
</options>
</step>
</steps>
</flow>
flow
.inbound(sample?transport=synchronous")
.source(“https:sample?preserveHttpHeader=true”)
.action(“split:xpath?expression=/names/name&out=split”)
.action(“replace:myregex?in=split”)
.action(“aggregate:xml?completionCount=3”)
.sink(“sql:query?database=mysql&username=example&host=xx”)

Component Libraries

The Transpiler

  1. Source code

Hello world!

<flow>
<name>HelloWorld</name>
<steps>
<step>
<type>source</type>
<uri>timer:foo</uri>
</step>
<step>
<type>sink</type>
<uri>print:Hello World!</uri>
</step>
</steps>
</flow>
2022-09-02 15:54:32.675  INFO 1848 --- [2 - timer://foo] 1-2                                      : Hello World
  1. The program is named “Hello World”.
  2. It contains two levels: flow and step.
  3. There is one source step triggers the program and the sink step (the last step) prints “Hello World!”.
<dil>
<integrations>
<integration>
<id>1</id>
<name>default</name>
<options>
<environmentName>PRODUCTION</environmentName>
<stage>PRODUCTION</stage>
</options>
<flows>
<flow>
<id>12345</id>
<name>HelloWorld2</name>
<steps>
<step>
<id>1</id>
<type>source</type>
<uri>component:timer:foo</uri>
<links>
<link>
<id>link1to2</id>
<type>sync</type>
<bound>out</bound>
</link>
</links>
</step>
<step>
<id>2</id>
<type>sink</type>
<uri>block:print:Hello World!</uri>
<links>
<link>
<id>link1to2</id>
<type>sync</type>
<bound>in</bound>
</link>
</links>
</step>
</steps>
</flow>
</flows>
</integration>
</integrations>
</dil>
  1. Levels: Make the flow part of integration. An integration can have one or multiple (linked) flows.
  2. ID’s: Many databases use ID’s to store objects. It’s with an ID easier to manage an integration.
  3. Links: The links define the flow of control. If no links are defined, it just processes the steps from first to last. If they are defined, the order of steps doesn’t matter.

Try it yourself!

Download & Run

java -jar gateway-[version].jar

Folder

  1. Create a file in a text editor
  2. Save the file in the deploy folder:
/{user.home}/.assimbly/deploy

GUI

  1. Login to the gateway (admin/admin by default):
http://localhost:8080

API

  1. After the gateway started, go to the following URL:
http://localhost:8088/#/admin/docs
/api/integration/{integrationId}/flow/test/{flowId}

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store