This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
howtos:reading_data_into_arrays [2011/05/17 15:01] marcus.williams |
howtos:reading_data_into_arrays [2011/05/25 13:42] (current) marcus.williams |
||
---|---|---|---|
Line 2: | Line 2: | ||
There's amost always a mapping required; whether it's done in a TOOL script, a view or in the model. | There's amost always a mapping required; whether it's done in a TOOL script, a view or in the model. | ||
+ | |||
+ | Name data informants appropropriately (to indicate their strong data dependence) as opposed to target informats which tend to be more generic. E.g. use "_data" suffix for name, "_d" for index. | ||
+ | |||
+ | I usually tackle moderately complex imports in a stand alone TOOL script (not a view) kept alongside the source data, which produces a whatIf-friendly output (TOOL or text), along with informants. | ||
===== Case 1 - Data informant used in model diagram ===== | ===== Case 1 - Data informant used in model diagram ===== | ||
Line 14: | Line 18: | ||
Write and run script with this format: | Write and run script with this format: | ||
- | <file> | + | <file> |
- | Get informants from file | + | Get informants from file |
- | Export informants | + | Export informants |
- | </file> | + | </file> |
Inspect informants, and create mappings. Grow script to: | Inspect informants, and create mappings. Grow script to: | ||
- | <file> | + | <file> |
- | Get informants from file | + | Get informants from file |
- | !Export informants (now optional) | + | !Export informants (now optional) |
- | Define mappings (from parameters or from external file) | + | Define mappings (from parameters or from external file) |
- | Create/import data with data informants | + | Create/import data with data informants |
- | Apply mappings | + | Apply mappings |
- | Export data | + | Export data |
- | </file> | + | </file> |