... | ... | @@ -45,6 +45,8 @@ You can fill the data here in three ways: |
|
|
|
|
|
If you put a column present in the header of the data csv an one for one mapping will be done (each row you contain
|
|
|
exactly the same data from the csv base.).
|
|
|
|
|
|
You can also put a column from another table by writing (~other_table_name.column). if there's an year column or a foreign key column, both will be used as WHERE clauses.
|
|
|
|
|
|
* Case Mapping:
|
|
|
|
... | ... | @@ -53,17 +55,20 @@ You can fill the data here in three ways: |
|
|
The case can have as variables:
|
|
|
* Columns from the header(data csv),
|
|
|
* Columns from the current table (the name of the column in the database),
|
|
|
* Columns from another table if there's an year column or an year column, both will be used as WHERE clauses during
|
|
|
* Columns from another table if there's an year column or a foreign key column, both will be used as WHERE clauses during
|
|
|
the execution of the CASE. The column name of the other table needs to be preceded by the other table name
|
|
|
(Eg.: other_table.collum).
|
|
|
|
|
|
The format to execute a case mapping is: ~CASE WHEN "var" THEN "X" WHEN... ELSE "Y" END.
|
|
|
|
|
|
* Simple functions:
|
|
|
|
|
|
HOTMapper can also execute some functions from SQL that have only one parameter, in the same syntax as SUM(column).
|
|
|
HOTMapper can also execute some functions from SQL that have only one parameter, in the same syntax as ~SUM(column). As with the CASE, it's needed to be preceded by a '~'(tilde).
|
|
|
|
|
|
Differently of all the other methods of mapping, this function will not be executed during an insertion or update.
|
|
|
To execute it is needed to run the run_aggregations command.
|
|
|
|
|
|
Bellow you can see an example of a mapping protocol empty and filled, those files come with hotmapper inside of
|
|
|
hotmapper/mapping_protocols and named empty_map_protocol.csv, example_mapping_protocols.csv respectively.
|
|
|
Bellow you can see an example of a filled mapping protocol, this file comes with hotmapper, inside of hotmapper/mapping_protocols and named example_mapping_protocols.csv. There's also an empty mapping protocol to be used as based named empty_map_protocol.csv
|
|
|
|
|
|
![example_protocol2](uploads/ffd21e5985b81237ffddf06d43d9ef22/example_protocol2.png)
|
|
|
|