From 55570992007f2ef248a69ea16c73d530332983b1 Mon Sep 17 00:00:00 2001 From: Paul Cornell Date: Wed, 12 Mar 2025 08:18:48 -0700 Subject: [PATCH] UI/API: Astra DB destination connector - flatten metadata toggle --- snippets/destination_connectors/astradb_rest_create.mdx | 3 ++- snippets/destination_connectors/astradb_sdk.mdx | 3 ++- snippets/general-shared-text/astradb-api-placeholders.mdx | 1 + snippets/general-shared-text/astradb-platform.mdx | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/snippets/destination_connectors/astradb_rest_create.mdx b/snippets/destination_connectors/astradb_rest_create.mdx index 06fda4e6..6a14e5d3 100644 --- a/snippets/destination_connectors/astradb_rest_create.mdx +++ b/snippets/destination_connectors/astradb_rest_create.mdx @@ -13,7 +13,8 @@ curl --request 'POST' --location \ "api_endpoint": "", "collection_name": "", "keyspace": "", - "batch_size": + "batch_size": , + "flatten_metadata": "" } }' ``` \ No newline at end of file diff --git a/snippets/destination_connectors/astradb_sdk.mdx b/snippets/destination_connectors/astradb_sdk.mdx index 4986d4c4..48625e7f 100644 --- a/snippets/destination_connectors/astradb_sdk.mdx +++ b/snippets/destination_connectors/astradb_sdk.mdx @@ -20,7 +20,8 @@ with UnstructuredClient(api_key_auth=os.getenv("UNSTRUCTURED_API_KEY")) as clien api_endpoint="", collection_name="", keyspace="", - batch_size= + batch_size=, + flatten_metadata= ) ) ) diff --git a/snippets/general-shared-text/astradb-api-placeholders.mdx b/snippets/general-shared-text/astradb-api-placeholders.mdx index 1e62a7b3..054cef0e 100644 --- a/snippets/general-shared-text/astradb-api-placeholders.mdx +++ b/snippets/general-shared-text/astradb-api-placeholders.mdx @@ -4,3 +4,4 @@ - `` (_required_) - The name of the collection in the namespace. - `` - The name of the keyspace in the collection. The default is `default_keyspace` if not otherwise specified. - `` - The maximum number of records to send per batch. The default is `20` if not otherwise specified. +- `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`). diff --git a/snippets/general-shared-text/astradb-platform.mdx b/snippets/general-shared-text/astradb-platform.mdx index 2221ae9c..e7f0a3c7 100644 --- a/snippets/general-shared-text/astradb-platform.mdx +++ b/snippets/general-shared-text/astradb-platform.mdx @@ -4,5 +4,8 @@ Fill in the following fields: - **Collection Name** (_required_): The name of the collection in the namespace. - **Keyspace** (_required_): The name of the keyspace in the collection. - **Batch Size**: The maximum number of records per batch. The default is `20` if not otherwise specified. +- **Flatten Metadata**: Check this box 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. - **API Endpoint** (_required_): The database's associated API endpoint. - **Token** (_required_): The application token for the database.