File:RDB reader.ANA
RDB_reader.ANA (file size: 14 KB, MIME type: text/rtf)
Warning: This file type may contain malicious code. By executing it, your system may be compromised.
| Moderator:Nobody (see all) Click here to sign up. |
|
|
| Upload data
|
Analytica model that reads variable results from the Result database. It contains two functions for the user and two technical functions.
RDB_to_var:
Brings the results from the Result database and transforms it into variables of the correct form.
NOTE! All necessary indices must be created before running this function. The necessary indices can be viewed by calling the function Do_first with the same two parameters as this function.
PARAMETERS:
- Var_name: the name of the variable in the result database.
- Run_id: the identifier of the run from which the results will be brought. If omitted, the newest result will be brought.
- Textornot: Tells whether the result is numerical or text. If parameter is omitted or false, numerical is assumed, otherwise text.
Do_first:
This function brings the variable from the Result database and analyses its structure. Each index used will be shown as a column along '.Ind_name', and each location of that index will be shown along '.K'. The last row of '.K' shows the samplesize of the variable. Use this information to create the necessary indices for your model and to adjust the samplesize of the model. If the samplesize of the model is smaller than in the result database, the remaining samples are omitted; if larger, the cells with no results in the database are replaced with null.
NOTE! The indices created should be lists of labels (not lists of numbers).
PARAMETERS (see also above):
- Var_name
- Run_id
Readdata: SQL query:
SELECT Variable.var_name, var_unit, Loc_of_result.result_id, result, sample, dim_name, ind_name, location, Run.run_id, run_method FROM Variable, Result, Loc_of_result, Location, Dimension, `Index`, Run_list, Run WHERE Variable.var_name = "'&Var_name&'" AND Run.run_id = '&Run_id&' AND Variable.var_id = Loc_of_result.var_id AND Loc_of_result.result_id = Result.result_id AND Loc_of_result.loc_id = Location.loc_id AND Loc_of_result.ind_id = `Index`.ind_id AND Location.dim_id = Dimension.dim_id AND Loc_of_result.result_id = Run_list.result_id AND Run_list.run_id = Run.run_id
Newestrun SQL query:
SELECT Run_id FROM Variable , Loc_of_result, Run_list WHERE Variable.var_name = "'&Var_name&'" AND Variable.var_id = Loc_of_result.var_id AND Loc_of_result.result_id = Run_list.result_id
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Dimensions | User | Comment | |
|---|---|---|---|---|
| current | 11:24, 9 October 2008 | (14 KB) | Jouni (talk | contribs) | Description field added. A function Descr added: it brings the descriptions of the locations of an index. |
| 17:23, 16 September 2008 | (13 KB) | Jouni (talk | contribs) | Input and output nodes created. The idea is to use this with AWP of PowerPlayer. AWP does not open this file for some reason. | |
| 13:50, 16 September 2008 | (8 KB) | Jouni (talk | contribs) | ALL remaining problems fixed. Now should work as planned! | |
| 22:34, 12 September 2008 | (204 KB) | Jouni (talk | contribs) | Code completely rewritten. Now it is much more beautiful and simple. All code is in functions. Proper indices must be created before performing the function. A test function can be used to see what to create. | |
| 14:17, 11 September 2008 | (198 KB) | Jouni (talk | contribs) | Drafts of new ideas - nothing complete | |
| 22:10, 10 August 2008 | (209 KB) | Jouni (talk | contribs) | Now it does not crash any more. | |
| 21:37, 10 August 2008 | (206 KB) | Jouni (talk | contribs) | A version that crashes when you run the "RDB variable" node. | |
| 14:08, 8 August 2008 | (202 KB) | Jouni (talk | contribs) | Analytica model that reads variable results from the Result database. |
You cannot overwrite this file.
File usage
There are no pages that use this file.