github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/processors/aws_dynamodb_partiql.md (about)

     1  ---
     2  title: aws_dynamodb_partiql
     3  type: processor
     4  status: experimental
     5  categories: ["Integration"]
     6  ---
     7  
     8  <!--
     9       THIS FILE IS AUTOGENERATED!
    10  
    11       To make changes please edit the contents of:
    12       lib/processor/aws_dynamodb_partiql.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  :::caution EXPERIMENTAL
    19  This component is experimental and therefore subject to change or removal outside of major version releases.
    20  :::
    21  Executes a PartiQL expression against a DynamoDB table for each message.
    22  
    23  Introduced in version 3.48.0.
    24  
    25  
    26  <Tabs defaultValue="common" values={[
    27    { label: 'Common', value: 'common', },
    28    { label: 'Advanced', value: 'advanced', },
    29  ]}>
    30  
    31  <TabItem value="common">
    32  
    33  ```yaml
    34  # Common config fields, showing default values
    35  label: ""
    36  aws_dynamodb_partiql:
    37    query: ""
    38    args_mapping: ""
    39    region: ""
    40    credentials:
    41      profile: ""
    42  ```
    43  
    44  </TabItem>
    45  <TabItem value="advanced">
    46  
    47  ```yaml
    48  # All config fields, showing default values
    49  label: ""
    50  aws_dynamodb_partiql:
    51    query: ""
    52    unsafe_dynamic_query: false
    53    args_mapping: ""
    54    region: ""
    55    endpoint: ""
    56    credentials:
    57      profile: ""
    58      id: ""
    59      secret: ""
    60      token: ""
    61      role: ""
    62      role_external_id: ""
    63  ```
    64  
    65  </TabItem>
    66  </Tabs>
    67  
    68  Both writes or reads are supported, when the query is a read the contents of the message will be replaced with the result. This processor is more efficient when messages are pre-batched as the whole batch will be executed in a single call.
    69  
    70  ## Examples
    71  
    72  <Tabs defaultValue="Insert" values={[
    73  { label: 'Insert', value: 'Insert', },
    74  ]}>
    75  
    76  <TabItem value="Insert">
    77  
    78  The following example inserts rows into the table footable with the columns foo, bar and baz populated with values extracted from messages:
    79  
    80  ```yaml
    81  pipeline:
    82    processors:
    83      - aws_dynamodb_partiql:
    84          query: "INSERT INTO footable VALUE {'foo':'?','bar':'?','baz':'?'}"
    85          args_mapping: |
    86            root = [
    87              { "S": this.foo },
    88              { "S": meta("kafka_topic") },
    89              { "S": this.document.content },
    90            ]
    91  ```
    92  
    93  </TabItem>
    94  </Tabs>
    95  
    96  ## Fields
    97  
    98  ### `query`
    99  
   100  A PartiQL query to execute for each message.
   101  
   102  
   103  Type: `string`  
   104  
   105  ### `unsafe_dynamic_query`
   106  
   107  Whether to enable dynamic queries that support interpolation functions.
   108  
   109  
   110  Type: `bool`  
   111  Default: `false`  
   112  
   113  ### `args_mapping`
   114  
   115  A [Bloblang mapping](/docs/guides/bloblang/about) that, for each message, creates a list of arguments to use with the query.
   116  
   117  
   118  Type: `string`  
   119  Default: `""`  
   120  
   121  ### `region`
   122  
   123  The AWS region to target.
   124  
   125  
   126  Type: `string`  
   127  Default: `""`  
   128  
   129  ### `endpoint`
   130  
   131  Allows you to specify a custom endpoint for the AWS API.
   132  
   133  
   134  Type: `string`  
   135  Default: `""`  
   136  
   137  ### `credentials`
   138  
   139  Optional manual configuration of AWS credentials to use. More information can be found [in this document](/docs/guides/cloud/aws).
   140  
   141  
   142  Type: `object`  
   143  
   144  ### `credentials.profile`
   145  
   146  A profile from `~/.aws/credentials` to use.
   147  
   148  
   149  Type: `string`  
   150  Default: `""`  
   151  
   152  ### `credentials.id`
   153  
   154  The ID of credentials to use.
   155  
   156  
   157  Type: `string`  
   158  Default: `""`  
   159  
   160  ### `credentials.secret`
   161  
   162  The secret for the credentials being used.
   163  
   164  
   165  Type: `string`  
   166  Default: `""`  
   167  
   168  ### `credentials.token`
   169  
   170  The token for the credentials being used, required when using short term credentials.
   171  
   172  
   173  Type: `string`  
   174  Default: `""`  
   175  
   176  ### `credentials.role`
   177  
   178  A role ARN to assume.
   179  
   180  
   181  Type: `string`  
   182  Default: `""`  
   183  
   184  ### `credentials.role_external_id`
   185  
   186  An external ID to provide when assuming a role.
   187  
   188  
   189  Type: `string`  
   190  Default: `""`  
   191  
   192