User Tools

Site Tools


DATA PROCESSING

Intro | Session 1 | Session 2 | Session 3 | Session 4 | Session 5 | Session 6 | Session 7 | Session 8

There are many tools available in EASA to process and manipulate data, data may be entered by a User or read from an outside source, such as a database, spreadsheet or text file.

DATA PROCESSING is a parent for SCALAR and LIST data processing objects.

A SCALAR contains a single value, while a LIST is a sequence of one or more values.


A. Use COMPUTE to show a default has changed

1. Login in, select Stock Screener and open it in the EASAP Builder.

  • With a browser on the EASA Server select: EASA > Set Mode > Author
  • Select and open Stock Screener in the EASAP Builder

2. A DATA PROCESSING > COMPUTE is an expression that evaluates to a value.

Here we want to know if the User has changed the default blank setting for the stock exchange INPUTBOX.

3. We use a logical expression to signal if the User has chosen to filter by stock exchange.

  • Expand data_processing_Stock_Analysis by clicking on its ' + '
  • Right-click SCALAR
  • Select: Child > Add COMPUTE
  • Rename it compute_Exchange
  • Set Value: inputbox_Exchange == "" (two empty double-quotes for empty string)

Value: will evaluate to either:

  • 0.0 (or true) while inputbox_Exchange is unset
  • 1.0 (or false) once the User sets it to something other than the default blank setting

4. Create a similar COMPUTE for inputbox_Sector, to signal that a User has changed the 'business sector' INPUTBOX.

  • Right-click compute_Exchange
  • Select: Copy
  • Right-click compute_Exchange again
  • Select: Paste (Sibling)
  • Rename it compute_Sector
  • Set Value: inputbox_Sector == "" (two empty double-quotes for empty string)

5. Create a third COMPUTE for inputbox_Field_Name

  • Right-click compute_Sector
  • Select: Copy
  • Right-click compute_Sector again
  • Select: Paste (Sibling)
  • Rename it compute_Query
  • Set Value: inputbox_Field_Name =="" (two empty double-quotes for empty string)

B. Use MAP's to build a query

1. Add a MAP to store a partial WHERE-clause for a SQL query to narrow a results set.

  • Right-click compute_Query
  • Select: Sibling > Add MAP
  • Rename it map_Exchange
  • Set
    Value: compute_Exchange
    Inputs: 1.0,0.0
    Outputs: ,AND Exchange = '%inputbox_Exchange%'
    (the Outputs: parameter value needs to have a space in front of the comma, a blank space is an acceptable output)

This MAP takes a current value of compute_Exchange of possible Inputs: and sets map_Exchange to the corresponding value of Outputs:

  • If compute_Exchange equals 1.0
    map_Exchange will have a value of a space.
  • if compute_Exchange equals 0.0
    map_Exchange will have a value of ‘AND Exchange = 'inputbox_Exchange
    (notice the percent signs disappear after the object reference is recognized)

An reference to map_Exchange will be used in the SQL statement as described in Session 5

2. Copy and Paste the MAP in the prior step and modify it for the 'business sector' part of the SQL query.

  • Right-click map_Exchange
  • Select: Copy
  • Right-click map_Exchange again
  • Select: Paste (Sibling)
  • Rename it map_Sector
  • Set
    Value: compute_Sector
    Inputs: 1.0,0.0
    Outputs: ,AND Sector = '%inputbox_Sector%'
    (again, the Outputs: parameter value must have a space in front of the comma, blank space is valid)

3. Copy and Paste a third MAP, then combine the two earlier MAP's into a completed SQL query.

  • Right-click map_Sector
  • Select: Copy
  • Right-click map_Sector
  • Select: Paste (Sibling)
  • Rename it map_Query
  • Set
    Value: compute_Query
    Inputs: 1.0,0.0
    Outputs: ,AND %inputbox_Field_Name% %inputbox_Operator% %inputbox_Value%
    (again the Outputs: parameter value must have a space in front of the comma)

C. Use EXPAND to create a string from object references

EXPAND constructs one or more lines of text.

1. The financial query can be composed directly from the three INPUTBOXs for use in the REPORT.

  • Right-click map_Query
  • Select: Sibling > Add EXPAND
  • Rename it Financial_Query
  • Set Value: %inputbox_Field_Name% %inputbox_Operator% %inputbox_Value%
    (put a space in-between each of the % symbols)

2 . Use a MAP to insert either a blank space or the financial query if it is selected, into the REPORT (see Session 7).

  • Right-click map_Query
  • Select: Copy
  • Right-click map_Query
  • Select: Paste (Sibling)
  • Rename it map_Query_Report
  • Set
    Value: compute_Query
    Inputs: 1.0,0.0
    Outputs: , %Financial_Query%
    (intial space on this line)
  • Save the EASAP, click on the 'Save' button or type CTRL-s

3. Confirm the EASAP Tree looks similar to the following.

We have completed Session 4 and we may either proceed to the next session or take a break and exit out of EASAP Builder.

Introduction | Session 1 | Session 2 | Session 3 | Session 4 | Session 5 | Session 6 | Session 7 | Session 8