<< Click to Display Table of Contents >> Navigation: 4. How to use Anatella? > 4.3. A second example |
We will create an Anatella-Graph that reads a CSV file, filter some rows out of the CSV file and write back on the Hard Drive the “filtered” CSV file.
Add inside the Anatella-Graph, the following Actions:
•CSV file reader :
•Row filter:
•CSV file writer:
•Global Run Flag:
You should obtain something like this:
If required, click on the icon in the main toolbar: We are now in “Connect mode”: We will connect the different Actions together. Let’s do a simple left-click on the output pin of the “CSV file reader Action”: A red line appears:
Now, click on the input pin of the “Row filter Action”:
We just created a new arrow that means: “The table that is coming from the CSV file will be injected into the Row filter Action.”
TIP: You can use the “middle-mouse-click” to easily switch between “Connect mode” and “Run mode”.
TIP: When you are drawing a new Arrow, you will notice that there is a “red line” that is following your mouse: This “red line” is a “preview” of the new Arrow that will soon be added to your Anatella-Transformation-Graph.
TIP: To cancel drawing a new arrow (to remove the “red line” that is always following your mouse): you can:
* Press the Escape Key.
* Right-click several times until the “red line” disappears.
* Middle-mouse-click (this will also switch to “Run mode”).
Let’s connect all the actions together. We obtain something like this:
TIP: The arrows that are connecting the Anatella actions are not always “straight lines”: You can give to these arrows very complex shapes: When the “red line” is visible, left-click anywhere inside the graph window to “shape” the arrow in any shape that you want. In the following small example we are in the process of creating a new arrow with a complex “S” shape:
It can happen that sometime, you left-clicked several times at several wrong locations on the graph and you obtained a “wrong arrow shape”: For example:
This is not a problem: you can always RIGHT-click to undo any LEFT-click that you made. Using the RIGHT-click mouse button, you can easily correct the current “arrow shape” to easily obtain the desired result.
For example, if I RIGHT-click 3 times, then I undo the 3 last LEFT-clicks and I obtain:
You will find detailed explanations in the sections 5.2.1, 5.5.7 and 5.26.1 on how to configure the “CSV file reader Action”, the “Row filter Action” and the “CSV file writer Action”. See the next section to have more information about the last action used: the “Global Run Flag Action”.
When you click on the button inside the main toolbar of Anatella, you execute the Anatella-graph: The below example creates a new CSV file that only contains “filtered rows”. Here is a screenshot of an execution example: