--- title: "Examples (ETL/ELT)" slug: "etl-examples" status: "update" updated: 2026-11-10T08:16:08Z published: 2026-11-10T08:16:08Z canonical: "docs.lobstersoftware.com/etl-examples" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Examples (ETL/ELT) Each ETL/ELT pipeline consists of at least one ETL/ELT task. Each task has a source and a destination. One row of source data is read in at a time, no matter what the data source is. From this, one row of destination data is generated until the source data has been processed. ## Example 1 (ETL/ELT source fields) Let's assume a pipeline with one task. We use the following simple CSV file (with header row) as data source and also want to write into a CSV file in the destination. ``` Firstname,Lastname,Points Robert,Hammer,55 ``` We create a new ETL/ELT pipeline ① with the name `My_pipeline_1_EN` and leave all default settings. Then we create a new ETL/ELT task ② with the name `my_task_1` and jump directly into the source data ③ and set it to the *CSV/Text* type. There we enter the path ④ to our CSV file and set the checkbox ⑤ to indicate that our file contains a header row. We enter a comma as the separator ⑥. ![images/download/attachments/131696646/1469-version-4-modificationdate-1745309338154-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1469-version-4-modificationdate-1745309338154-api-v2.png) As you can see below ④, the column names have already been recognised by setting ⑤. We remember that one row at a time is read in from the source data. This row is now internally broken down into so-called ETL/ELT source fields. The names of these ETL/ELT source fields are taken from the header line and are `$Firstname`, `$Lastname` and `$Points`. Now we jump directly to the destination data ⑦ to build our destination data row there with our ETL/ELT source fields. ![images/download/attachments/131696646/1470-version-3-modificationdate-1745309354119-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1470-version-3-modificationdate-1745309354119-api-v2.png) We also enter *CSV/Text* as the destination data type ⑧ and enter the name and path to the file to be generated ⑨. Then we select our ETL/ELT source fields ⑩ and move them to the right with ⑪. With this we have already defined the destination data row to be generated: `$Firstname`*,*`$Lastname`*,*`$Points` Now click on ⑫. Another dialog appears. ![images/download/attachments/131696646/1471-version-2-modificationdate-1745309553848-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1471-version-2-modificationdate-1745309553848-api-v2.png) Leave ⑬ as in the screenshot, we only have one row of data in our source file anyway, and then click on ⑭. As you will see in your file system, you have already created your first file. Later you can change details such as separators, headers, quoting character in the settings, but we won't dwell on that for now. Import: [ETL_My_pipeline_1_EN.obj](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/ETL_My_pipeline_1_EN.obj) [test_1_in_EN.csv](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/test_1_in_EN.csv) ## Example 2 (Custom ETL/ELT fields) In this example, we use the pipeline from example 1 as a basis. There we showed how to build the destination data from the ETL/ELT source fields read in from the source data. Now we want to show how you can define and use custom ETL/ELT fields. To do this, we switch to the corresponding tab and create a new field via the context menu. ![images/download/attachments/131696646/1472-version-2-modificationdate-1745311373672-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1472-version-2-modificationdate-1745311373672-api-v2.png) As value we want to give the custom ETL/ELT field the value of the ETL/ELT source field `Points` coming from the source data and add `20`. ![images/download/attachments/131696646/1473-version-2-modificationdate-1745311388045-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1473-version-2-modificationdate-1745311388045-api-v2.png) ① The name of our new custom ETL/ELT field. ② We use a function to calculate the field value. ③ Move the desired function to the right with the arrow, as usual. ④ There is a specific parameter type for ETL/ELT source fields. You can then select the desired field, here `Points`. ![images/download/attachments/131696646/1474-version-3-modificationdate-1745311401358-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1474-version-3-modificationdate-1745311401358-api-v2.png) Now we switch to the destination data tab. We select our custom ETL/ELT field ⑤ instead of the ETL/ELT source field `Points` ⑥ and move it to the right to use it as the third value of our destination data row ⑦. Do a test run as shown in example 1 and see the result. Import: [ETL_My_pipeline_2_EN.obj](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/ETL_My_pipeline_2_EN.obj) [test_1_in_EN.csv](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/test_1_in_EN%20(1).csv) ## Example 3 (ETL/ELT variables) We again use the pipeline from example 1 as a basis. In the destination data row, however, we now use an ETL/ELT variable instead of an ETL/ELT source field or a custom ETL/ELT field. To do this, we first create a new variable in the corresponding tab and give it a value. ![images/download/attachments/131696646/1475-version-2-modificationdate-1745312598498-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1475-version-2-modificationdate-1745312598498-api-v2.png) Then we use this variable in our destination data row. ![images/download/attachments/131696646/1476-version-3-modificationdate-1745312615152-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1476-version-3-modificationdate-1745312615152-api-v2.png) Do a simple test run as shown in example 1 and see the result. **NOTE:** In this example, we have given the variable an initial value, but the value of the variable could also be passed by a workflow, for example, when it starts the pipeline. Import: [ETL_My_pipeline_3_EN.obj](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/ETL_My_pipeline_3_EN.obj) [test_1_in_EN.csv](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/test_1_in_EN%20(2).csv) ## Example 4 (Child task) In this example we want to show the interaction between parent and child tasks. ![images/download/thumbnails/131696646/1514-version-2-modificationdate-1745313371940-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1514-version-2-modificationdate-1745313371940-api-v2.png) To do this, we use the parent task `my_task_1`, in which we read in a CSV file with several rows and do not generate any destination data. The child task `my_task_1.1` is then executed as often as the CSV file has rows. In the child task, we ignore the source data and create one destination data row. In the destination data row, we use the ETL/ELT source fields from the parent task (which we have access to in the child task). This way we create as many destination files as the original source file in the parent task has rows. For the names of the generated files, we use a counter variable that we increment in the conditions of the child task's destination data (see the construct there). Do a simple test run as shown in example 1 and see the result. Import: [ETL_My_pipeline_4_EN.obj](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/ETL_My_pipeline_4_EN.obj) [test_2_in_EN.csv](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/test_2_in_EN.csv) ## Example 5 (Sibling task, clipboard) In this example we want to show the interaction between sibling tasks. ![images/download/thumbnails/131696646/1522-version-2-modificationdate-1745313753468-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1522-version-2-modificationdate-1745313753468-api-v2.png) In task `my_task_1` we read in a CSV file, do not create a destination file and write all ETL/ELT source fields to the [Clipboard (ETL/ELT)](/v1/docs/en/mod-etl--entry-tab-3-tab-5) because we want to use them in sibling `task my_task_2` but do not have direct access to them there. In sibling task `my_task_2` we then read in the clipboard in the source data and then create the destination file from it. Do a simple test run (with 3 rows) as shown in example 1 and see the result. Import: [ETL_My_pipeline_5_EN.obj](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/ETL_My_pipeline_5_EN.obj) [test_2_in_EN.csv](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/test_2_in_EN%20(1).csv) ## Example 6 (Practical example currency conversion) In this example, we read in a file with a list of order items and create an identical file from it, but the item prices are converted from Euros to US dollars. The following is the source file. ``` item_number,price,quantity 102788,17.99,2 116700,4.49,3 210098,23.77,1 ``` ![images/download/attachments/131696646/1566-version-3-modificationdate-1745315106767-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1566-version-3-modificationdate-1745315106767-api-v2.png) ① In the first task we only get the conversion rate from Euros to US Dollars. ② To do this, we use a Function chain in the conditions. We fetch the conversion rate via HTTP call, which in this example only retrieves a random number. We then store this value in an ETL/ELT variable. ![images/download/attachments/131696646/1567-version-2-modificationdate-1745315124059-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1567-version-2-modificationdate-1745315124059-api-v2.png) ③ In a second task we then read the input file. We also define a custom ETL/ELT field. The value of this field is the read in item price multiplied by the conversion rate in our ETL/ELT variable. ![images/download/attachments/131696646/1568-version-3-modificationdate-1745315138159-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1568-version-3-modificationdate-1745315138159-api-v2.png) ④ In the destination data we then use the ETL/ELT source fields, but for the price we use our custom ETL/ELT field instead. Import: [ETL_My_pipeline_6.obj](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/ETL_My_pipeline_6.obj) [currency_in.csv](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/currency_in.csv) ## Example 7 (Practical example duplicate handling) Let's assume we want to read in a CSV file and make sure we remove any duplicates it may contain before writing to any destination (in the example, another CSV file). ```plaintext ID,Name 1,Peter 2,Paul 1,Peter 3,Michael ``` As can be seen, there are two entries with the same ID in the sample file. To clean up duplicates of this type, we proceed as follows. ![images/download/attachments/131696646/1711-version-2-modificationdate-1745316680395-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1711-version-2-modificationdate-1745316680395-api-v2.png) For each row to be written, we define conditions ① that tell us if this row contains an ID that has already been written. In the function chain defined there, we return `true` if the ID does not yet exist in an internal ID list and then add the ID to the list. If the ID already exists in the list, we return `false`. If `true`, the primary data destination (see [Destination data (action) (ETL/ELT)](/v1/docs/en/mod-etl--entry-tab-3-tab-4)) ② is used and we write the read row ③ there. If `false`, we execute a separate action ④ for this row, which is configured via ⑤ (see the following screenshot), i.e. the primary data destination is ignored. ![images/download/attachments/131696646/1712-version-2-modificationdate-1745316741354-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1712-version-2-modificationdate-1745316741354-api-v2.png) We define the [secondary data destination](/docs/en/mod-etl--entry-tab-3-tab-4) in ⑥, where we write the read in data ⑦ instead. So our cleaned up data is written into the destination file `data_out.csv` and duplicates end up in the destination file `duplicates_out.csv`. Import: [ETL_My_pipeline_7.obj](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/ETL_My_pipeline_7.obj) [data_with_duplicates.csv](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/data_with_duplicates.csv) If we write the read in data into a database, there is a more elegant solution if the ID is the primary key there. When trying to write a line with an ID into the database, which already exists there, an SQL error will occur. We can catch this error with the *error handling* and execute a separate action there analogously. ![images/download/attachments/131696646/1713-version-3-modificationdate-1745317098566-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1713-version-3-modificationdate-1745317098566-api-v2.png) ## Example 8 (Practical example: Direct bulk insert file→ database) This example shows how to write data directly from a text file into a database. This provides a significant processing speed advantage and can be used when no changes need to be made to the data. The database used in this example is MySQL (for other databases please refer to the documentation of the respective database manufacturer for similar functions). **NOTE:** See also [https://dev.mysql.com/doc/refman/8.0/en/load-data.html.](https://dev.mysql.com/doc/refman/8.0/en/load-data.html.) ![images/download/attachments/131696646/1577-version-2-modificationdate-1745317854866-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1577-version-2-modificationdate-1745317854866-api-v2.png) ![images/download/attachments/131696646/1578-version-2-modificationdate-1745317868029-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1578-version-2-modificationdate-1745317868029-api-v2.png) ① ETL/ELT field containing the file path and name. ② Use of the ETL/ELT field from ①. Analogously, an XML file can be processed. **NOTE:** See also [https://dev.mysql.com/doc/refman/8.0/en/load-xml.html.](https://dev.mysql.com/doc/refman/8.0/en/load-xml.html.) ![images/download/attachments/131696646/1579-version-2-modificationdate-1745317883034-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/1579-version-2-modificationdate-1745317883034-api-v2.png) A module for high-performance transfer and transformation of large amounts of data. An ETL/ELT pipeline consists of tasks, each of which defines a data source and a data destination. Typical use cases: database to database, CSV to database, or database to CSV. **ETL (Extract, Transform, Load)** is the traditional data integration workflow. Data is collected from sources and sent to a **staging area** to be cleaned, formatted, and enriched, and then loaded into a destination. It ensures data quality and security before storage, making it ideal for smaller, structured datasets. **ELT (Extract, Load, Transform)** is a data integration process that pulls raw data from a source and loads it directly into a target system (such as a cloud data warehouse) before processing it. This leverages the power of the target to perform transformations, enabling faster ingestion of big data. Function chains in Lobster consist of sequences of functions that are used to define conditions or to process data. The possibility of encapsulating them in macros and reusing them allows for central maintenance and compact use. Changes to a macro affect all profiles with that macro. Function chains can be determined both system-wide and client-specific. XML (Extensible Markup Language) is a structured text format for storing and exchanging data. Content is enclosed within freely definable tags such as `<order>`. XML is human-readable, machine-processable, and platform-independent. In the Lobster Data Platform, you can receive, parse, and generate XML data.