Steps definition

This document describes the steps that can be used in our SQL Translator pipeline. A step is the unit of transformation generated by a user interaction with the SQL visual query builder.

Implementation logic

The steps were implemented using the following concepts:

  • A step is named following this convention: **\_STEP\_**
  • A pipeline starts with a select step using the query provided by the user like below
    WITH SELECT_STEP_0 AS (<USER'S QUERY STRING>)
    
  • Each step concatenates the resulting query string it generates to the query string received in input For example, a SelectStep followed by a FilterStep results in
    WITH SELECT_STEP_0 AS (<USER'S QUERY STRING>),
    FILTER_STEP_1 AS (SELECT * FROM SELECT_STEP_0 WHERE PRICE > 10)
    
  • Each step updates the final selection query with its name For example, the query string sent to the data provider for a SelectStep followed by a FilterStep would be
    WITH SELECT_STEP_0 AS (<USER'S QUERY STRING>),
    FILTER_STEP_1 AS (SELECT * FROM SELECT_STEP_0 WHERE PRICE > 10)
    SELECT * FROM FILTER_STEP_1