How to create your first workflow

Let’s now follow some basic steps to help you create your first workflow. First of all, go to the Workflows section from the Workspace main menu bar (i.e. Workflows is located between Maps and Data Explorer).
Click on "Create your first workflow".
Choose the data warehouse connection that you want to use. In this case, choose CARTO Data Warehouse to find the data sources used in this example.
Now you can drag and drop the data sources and components that you want to use from the Components and Sources explorer into the Workflow canvas that is located in the center of the interface.
Now, as an example, let’s build a workflow to execute some simple data preparation tasks: filtering some rows from your original data source, selecting some specific columns and calculating a metric that is saved into a new column and finally renaming a column from your original table.
In order to do so, first of all, let's add the retail_stores table into our workflow from the demo_tables dataset available in your CARTO Data Warehouse connection.
Then, let’s filter only the rows with “city” equals to “BOSTON” using the SIMPLE_FILTER component.
At any point, you can rename your workflow by clicking and typing directly into the current title (if you haven’t defined it yet, it is named by default as “Untitled workflow”) in the top left corner, over the components and sources explorer.
Now we are going to proceed to select only the columns corresponding to the store ID (store_id), the type of store (storetype), the revenue generated (revenue) and its area in square meters (size_m2) using the SELECT component.
Next, we are going to calculate a new KPI with the revenue per square meter at each store using the CREATE_COLUMN component, defining a name for the new column in the first field (for example revenue_per_m2) and the expression to calculate it in the second field, which in this case will be revenue/size_m2.
Now, we can order the data by this new column in descending order using the ORDER_BY component.
And finally let’s add the LIMIT component to filter only 10 rows in order to finish our first workflow.
Now it’s time to click on the Run button and wait a few seconds to obtain the result of this first workflow: the top 10 of our retail stores with the most revenue per square meter.
Additionally, you can click on the expand button in the Results panel section of the interface, if you want to have an expanded look at the preview.