|
1 | 1 | # Configuring in Keboola Connection UI |
2 | 2 |
|
3 | | -## Sample |
| 3 | +## Sample scan mode |
4 | 4 |
|
5 | 5 |
|
6 | 6 | ```json |
|
23 | 23 | "title", |
24 | 24 | "year" |
25 | 25 | ], |
| 26 | + "mode": "scan", |
26 | 27 | "dateFilter": { |
27 | 28 | "field": "year", |
28 | 29 | "format": "Y", |
|
39 | 40 | } |
40 | 41 | ``` |
41 | 42 |
|
| 43 | + |
| 44 | +## Sample query mode |
| 45 | + |
| 46 | + |
| 47 | +```json |
| 48 | +{ |
| 49 | + "db": { |
| 50 | + "endpoint": "endpoint", |
| 51 | + "accessKeyId": "access key id", |
| 52 | + "#secretAccessKey": "secret access key", |
| 53 | + "regionName": "eu-central-1" |
| 54 | + }, |
| 55 | + "exports": [ |
| 56 | + { |
| 57 | + "id": 1, |
| 58 | + "name": "my-movies", |
| 59 | + "table": "Movies", |
| 60 | + "index": "Movies_SomeIndex", |
| 61 | + "enabled": true, |
| 62 | + "incremental": true, |
| 63 | + "primaryKey": [ |
| 64 | + "title", |
| 65 | + "year" |
| 66 | + ], |
| 67 | + "mode": "query", |
| 68 | + "keyConditionExpression": "#yr = :a", |
| 69 | + "expressionAttributeNames": { |
| 70 | + "#yr": "year" |
| 71 | + }, |
| 72 | + "expressionAttributeValues": { |
| 73 | + ":a": "2013" |
| 74 | + }, |
| 75 | + "limit": 100, |
| 76 | + "mapping": { |
| 77 | + "title": "title", |
| 78 | + "year": "year", |
| 79 | + "info.rating": "rating" |
| 80 | + } |
| 81 | + } |
| 82 | + ] |
| 83 | +} |
| 84 | +``` |
| 85 | + |
42 | 86 | ## Description of `parameters` |
43 | 87 |
|
44 | 88 | - `db`: DynamoDB instance connection options |
|
55 | 99 | - `enabled` (optional, default: `true`): if export is enabled or not (there has to be at least one enabled export) |
56 | 100 | - `incremental`: if load of tables to storage will be incremental |
57 | 101 | - `primaryKey`: primary key to set on imported table, defined as array |
58 | | - - `dateFilter` (optional): how to filter scanned documents |
| 102 | + - `mode`: (optional): enum(scan|query) reading mode from dynamoDb - defailt is scan |
| 103 | + - `keyConditionExpression`: (required): provide a specific value for the partition key |
| 104 | + - `expressionAttributeValues`: (required): values that can be substituted in an expression |
| 105 | + - `expressionAttributeNames`: (optional): substitution tokens for attribute names in an expression |
| 106 | + - `dateFilter` (optional): how to filter scanned documents (only for scan mode) |
59 | 107 | - `field`: field name in document by which you want to filter |
60 | 108 | - `format`: date format (e.g. `Y-m-d` for date or `Y` for year) |
61 | 109 | - `value`: date string from which date value will be created (e.g. `-2 days`) |
|
0 commit comments