Skip to content

Commit

Permalink
docs: update v2 migration guide (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
shellcromancer authored Nov 14, 2024
1 parent 25dfb73 commit 0b5934b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ sub.cnd.all([

#### `meta.for_each` Condition

This is replaced by the `meta.all`, `meta.any`, and `meta.none` conditions. If the `object.source_key` value is an array, then the data is treated as a list of elements.
This is replaced by the `meta.all`, `meta.any`, and `meta.none` conditions. If the `object.source_key` value is an array, then the data is treated as a list of elements.

v1.x.x:

Expand All @@ -104,10 +104,10 @@ sub.cnd.meta.for_each({
v2.x.x:

```jsonnet
sub.cnd.meta.any([{
sub.cnd.meta.any({
object: { source_key: 'field' },
conditions: [ sub.cnd.str.eq({ value: 'FOO' }) ],
}])
})
```

#### `meta.negate` Condition
Expand Down Expand Up @@ -184,8 +184,8 @@ v2.x.x:
sub.tf.meta.switch({ cases: [
{
condition: sub.cnd.str.eq({ obj: { source_key: 'field' }, value: 'FOO' }),
transforms: [
sub.tf.obj.insert({ object: { target_key: 'field' }, value: 'BAR' })
transforms: [
sub.tf.obj.insert({ object: { target_key: 'field' }, value: 'BAR' })
],
},
]})
Expand Down Expand Up @@ -247,7 +247,7 @@ sub.tf.send.aws.dynamodb.put({

The `enrich.aws.dynamodb` transform was renamed to `enrich.aws.dynamodb.query`, and had these additional changes:
- `PartitionKey` and `SortKey` now reference the column names in the DynamoDB table and are nested under the `Attributes` field.
- By default, the value retrieved from `Object.SourceKey` is used as the `PartitionKey` value. If the `SortKey` is provided and the value from `Object.SourceKey` is an array, then the first element is used as the `PartitionKey` value and the second element is used as the `SortKey` value.
- By default, the value retrieved from `Object.SourceKey` is used as the `PartitionKey` value. If the `SortKey` is provided and the value from `Object.SourceKey` is an array, then the first element is used as the `PartitionKey` value and the second element is used as the `SortKey` value.
- The `KeyConditionExpression` field was removed because this is now a derived value.

v1.x.x:
Expand Down

0 comments on commit 0b5934b

Please sign in to comment.