Skip to content

Commit aeab705

Browse files
authored
UI/API: Astra DB destination connector - flatten metadata toggle (#522)
1 parent 7d9f34d commit aeab705

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

snippets/destination_connectors/astradb_rest_create.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ curl --request 'POST' --location \
1313
"api_endpoint": "<api-endpoint>",
1414
"collection_name": "<collection-name>",
1515
"keyspace": "<keyspace>",
16-
"batch_size": <batch-size>
16+
"batch_size": <batch-size>,
17+
"flatten_metadata": "<true|false>"
1718
}
1819
}'
1920
```

snippets/destination_connectors/astradb_sdk.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as clien
2020
api_endpoint="<api-endpoint>",
2121
collection_name="<collection-name>",
2222
keyspace="<keyspace>",
23-
batch_size=<batch-size>
23+
batch_size=<batch-size>,
24+
flatten_metadata=<True|False>
2425
)
2526
)
2627
)

snippets/general-shared-text/astradb-api-placeholders.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
- `<collection-name>` (_required_) - The name of the collection in the namespace.
55
- `<keyspace>` - The name of the keyspace in the collection. The default is `default_keyspace` if not otherwise specified.
66
- `<batch-size>` - The maximum number of records to send per batch. The default is `20` if not otherwise specified.
7+
- `flatten_metadata` - Set to `true` to flatten the metadata into each record. Specifically, when flattened, the metadata key values are brought to the top level of the element, and the `metadata` key itself is removed. By default, the metadata is not flattened (`false`).

snippets/general-shared-text/astradb-platform.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ Fill in the following fields:
44
- **Collection Name** (_required_): The name of the collection in the namespace.
55
- **Keyspace** (_required_): The name of the keyspace in the collection.
66
- **Batch Size**: The maximum number of records per batch. The default is `20` if not otherwise specified.
7+
- **Flatten Metadata**: Check this box to flatten the metadata into each record.
8+
Specifically, when flattened, the metadata key values are
9+
brought to the top level of the element, and the `metadata` key itself is removed. By default, the metadata is not flattened.
710
- **API Endpoint** (_required_): The database's associated API endpoint.
811
- **Token** (_required_): The application token for the database.

0 commit comments

Comments
 (0)