Difference between revisions of "Post Processing SQL Scripts"

From IMSMA Wiki
Jump to: navigation, search
Line 8: Line 8:
  
 
If you would like to use Ordnance data, link items and/or use multi-select fields then you need to create SQL views.
 
If you would like to use Ordnance data, link items and/or use multi-select fields then you need to create SQL views.
 
+
[[Image:SAG Ordnance.png|650px|center]]
 +
<div align="center">
 +
'' Example with Ordnance and different formats of date''
 +
</div>
 +
[[Image:SAG concat.png|400px|center]]
 +
<div align="center">
 +
'' Example of fields being concatenated''
 +
</div>
 +
[[Image:SAG Link.png|200px|center]]
 +
<div align="center">
 +
'' Example of retrieving information from a linked table''
 +
</div>
 
{{Note | It is only the Country Structure of Locations that is flattened, other Country structure references (both system and CDFs) have to retrieved by SQL views.}}
 
{{Note | It is only the Country Structure of Locations that is flattened, other Country structure references (both system and CDFs) have to retrieved by SQL views.}}
[Image:SAG CS flattening1.png|500px|center]]
+
[[Image:SAG CS flattening1.png|300px|center]]
 
<div align="center">
 
<div align="center">
 
'' Country structure reference to where the Victim is currently living is not automatically flattened into the the Victim by the Staging Area Generator''
 
'' Country structure reference to where the Victim is currently living is not automatically flattened into the the Victim by the Staging Area Generator''
 
</div>
 
</div>
[Image:SAG CS flattening2.png|500px|center]]
+
[[Image:SAG CS flattening2.png|400px|center]]
 
<div align="center">
 
<div align="center">
'' ''
+
'' The flattening with be done with SQL script as part of the post-processing''
 
</div>
 
</div>
 +
 +
 
Contact your [[Management Consulting Team | GICHD IM advisor]] for help in developing SQL statements according to specific requirements.
 
Contact your [[Management Consulting Team | GICHD IM advisor]] for help in developing SQL statements according to specific requirements.
 
{{NavBox Business Intelligence}}
 
{{NavBox Business Intelligence}}
 
[[Category:VIE]]
 
[[Category:VIE]]

Revision as of 21:33, 8 July 2015

By using this optional step it is possible to change the Staging area after the generation. This can be valuable in several use cases, for example:

  • If the Staging area should only contain a subset of the IMSMANG database e.g. only Land with status Closed
  • If sensitive data (e.g. victim names and addresses) should not be included in the Staging area
  • If data has to be processed for reporting purposes e.g. complex calculations of square meters
  • If it would facilitate reporting to concatenate fields e.g. victim family and given names
  • If it would facilitate to add fields from other items e.g. Accident date to Victim table
  • If additional database SQL views are necessary, also for reporting and analysis purposes

If you would like to use Ordnance data, link items and/or use multi-select fields then you need to create SQL views.

SAG Ordnance.png

Example with Ordnance and different formats of date

SAG concat.png

Example of fields being concatenated

SAG Link.png

Example of retrieving information from a linked table

Note.jpg It is only the Country Structure of Locations that is flattened, other Country structure references (both system and CDFs) have to retrieved by SQL views.
SAG CS flattening1.png

Country structure reference to where the Victim is currently living is not automatically flattened into the the Victim by the Staging Area Generator

SAG CS flattening2.png

The flattening with be done with SQL script as part of the post-processing


Contact your GICHD IM advisor for help in developing SQL statements according to specific requirements.