Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
set_table_by_key [2013/08/21 23:34] admin [Inputs] |
set_table_by_key [2015/10/13 22:43] (current) admin |
||
|---|---|---|---|
| Line 8: | Line 8: | ||
| ^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
| - | | Table | [[Table Type|Table]] | The input table. | | + | | Table | [[Table Type]] | The input table. | |
| - | | Keys | [[Tuple Type|Tuple]] | Chain of keys identifying the sub-table that will be updated or insert. | | + | | Keys | [[Tuple Type]] | Chain of keys identifying the sub-table that will be updated or insert. | |
| - | | Sub Table | [[Table Type|Table]] | Sub-table that will be inserted into the input table. The column names in the sub-table must match the corresponding names in the input table. The column types must also be compatible. | | + | | Sub Table | [[Table Type]] | Sub-table that will be inserted into the input table. The column names in the sub-table must match the corresponding names in the input table. The column types must also be compatible. | |
| ===== Outputs ===== | ===== Outputs ===== | ||
| - | ^ Name ^ Type ^ Description ^ | + | ^ Name ^ Type ^ Description ^ |
| - | | Result | [[Table Type|Table]] | The resulting table. | | + | | Result | [[Table Type]] | The resulting table. | |
| ===== Group ===== | ===== Group ===== | ||
| Line 37: | Line 37: | ||
| ^ Key3* ^ Value1 ^ Value2 ^ Value3 ^ | ^ Key3* ^ Value1 ^ Value2 ^ Value3 ^ | ||
| - | |@green: 11 |@green: 12 |@green: "bbbb" |@green: 14 | | + | |@#C5D9FF: 11 |@#C5D9FF: 12 |@#C5D9FF: "bbbb" |@#C5D9FF: 14 | |
| - | |@green: 22 |@green: 12 |@green: "aaaa" |@green: 23 | | + | |@#C5D9FF: 22 |@#C5D9FF: 12 |@#C5D9FF: "aaaa" |@#C5D9FF: 23 | |
| results in | results in | ||
| Line 45: | Line 45: | ||
| | 1 | "a" | 11 | 12 | "bbbb" | 23 | | | 1 | "a" | 11 | 12 | "bbbb" | 23 | | ||
| | 1 | "b" | 22 | 12 | "cccc" | 23 | | | 1 | "b" | 22 | 12 | "cccc" | 23 | | ||
| - | |@lightgreen: 2 |@lightgreen: "a" |@green: 11 |@green: 12 |@green: "bbbb" |@green: 14 | | + | |@#CCFFCC: 2 |@#CCFFCC: "a" |@#C5D9FF: 11 |@#C5D9FF: 12 |@#C5D9FF: "bbbb" |@#C5D9FF: 14 | |
| - | |@lightgreen: 2 |@lightgreen: "a" |@green: 22 |@green: 12 |@green: "aaaa" |@green: 23 | | + | |@#CCFFCC: 2 |@#CCFFCC: "a" |@#C5D9FF: 22 |@#C5D9FF: 12 |@#C5D9FF: "aaaa" |@#C5D9FF: 23 | |
| | 2 | "d" | 22 | 12 | "dddd" | 12 | | | 2 | "d" | 22 | 12 | "dddd" | 12 | | ||
| Line 54: | Line 54: | ||
| ^ Key2* ^ Key3* ^ Value1 ^ Value2 ^ Value3 ^ | ^ Key2* ^ Key3* ^ Value1 ^ Value2 ^ Value3 ^ | ||
| - | |@green: "a" |@green: 11 |@green: 12 |@green: "bbbb" |@green: 14 | | + | |@#C5D9FF: "a" |@#C5D9FF: 11 |@#C5D9FF: 12 |@#C5D9FF: "bbbb" |@#C5D9FF: 14 | |
| - | |@green: "a" |@green: 22 |@green: 12 |@green: "aaaa" |@green: 23 | | + | |@#C5D9FF: "a" |@#C5D9FF: 22 |@#C5D9FF: 12 |@#C5D9FF: "aaaa" |@#C5D9FF: 23 | |
| - | |@green: "d" |@green: 22 |@green: 12 |@green: "dddd" |@green: 12 | | + | |@#C5D9FF: "d" |@#C5D9FF: 22 |@#C5D9FF: 12 |@#C5D9FF: "dddd" |@#C5D9FF: 12 | |
| results in | results in | ||
| Line 63: | Line 63: | ||
| | 1 | "a" | 11 | 12 | "bbbb" | 23 | | | 1 | "a" | 11 | 12 | "bbbb" | 23 | | ||
| | 1 | "b" | 22 | 12 | "cccc" | 23 | | | 1 | "b" | 22 | 12 | "cccc" | 23 | | ||
| - | |@lightgreen: 2 |@green: "a" |@green: 11 |@green: 12 |@green: "bbbb" |@green: 14 | | + | |@#CCFFCC: 2 |@#C5D9FF: "a" |@#C5D9FF: 11 |@#C5D9FF: 12 |@#C5D9FF: "bbbb" |@#C5D9FF: 14 | |
| - | |@lightgreen: 2 |@green: "a" |@green: 22 |@green: 12 |@green: "aaaa" |@green: 23 | | + | |@#CCFFCC: 2 |@#C5D9FF: "a" |@#C5D9FF: 22 |@#C5D9FF: 12 |@#C5D9FF: "aaaa" |@#C5D9FF: 23 | |
| - | |@lightgreen: 2 |@green: "d" |@green: 22 |@green: 12 |@green: "dddd" |@green: 12 | | + | |@#CCFFCC: 2 |@#C5D9FF: "d" |@#C5D9FF: 22 |@#C5D9FF: 12 |@#C5D9FF: "dddd" |@#C5D9FF: 12 | |
| If there is already a sub-table corresponding to the sub-table being inserted in the table, the existent sub-table is replaced by the new sub-table. The same is true if the sub-table being inserted is empty. In this case, the existent sub-table is removed from the input table. | If there is already a sub-table corresponding to the sub-table being inserted in the table, the existent sub-table is replaced by the new sub-table. The same is true if the sub-table being inserted is empty. In this case, the existent sub-table is removed from the input table. | ||
| - | It is not possible to insert a sub-table indexed by keys from arbitrary key columns. For example, in the example above, it is not possible to insert a sub-table corresponding to keys ''<2, 22>'', where 2 corresponds to the first column ("Key1") and 22 corresponds to the third column ("Key3"). To do this, first reorder the key columns using the [[Reorder Table Columns]] functor. | + | It is not possible to insert a sub-table indexed by keys from arbitrary key columns. For example, in the example above, it is not possible to insert a sub-table corresponding to keys ''<2, 22>'', where 2 corresponds to the first column ("Key1") and 22 corresponds to the third column ("Key3"). To do this, first reorder the key columns using the [[Reorder Table Column]] functor. |
| ===== Internal Name ===== | ===== Internal Name ===== | ||