From b8af6b48da8706ca5b9db863d99862c2826be8f5 Mon Sep 17 00:00:00 2001 From: Andrea Jost Date: Fri, 6 Mar 2026 11:45:03 -0500 Subject: [PATCH 1/5] updates to Teradata SQL destination connector --- snippets/general-shared-text/teradata-sql.mdx | 29 ++++++++++++++----- support/docs.code-workspace | 7 +++++ 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 support/docs.code-workspace diff --git a/snippets/general-shared-text/teradata-sql.mdx b/snippets/general-shared-text/teradata-sql.mdx index 3c8c2d57..30fdfb9f 100644 --- a/snippets/general-shared-text/teradata-sql.mdx +++ b/snippets/general-shared-text/teradata-sql.mdx @@ -36,8 +36,7 @@ When Unstructured writes rows to a table, the table's columns must have a schema that is compatible with Unstructured. Unstructured cannot provide a schema that is guaranteed to work for everyone in all circumstances. - This is because these schemas will vary based on - your source files' types; how you want Unstructured to partition, chunk, and generate embeddings; + This is because these schemas will vary based on your source files' types; how you want Unstructured to partition, chunk, and generate embeddings; any custom post-processing code that you run; and other factors. In any case, note the following about table schemas: @@ -62,17 +61,33 @@ to have Teradata generate the embeddings for you, instead of having Unstructured generate them. - Here is an example table schema that is compatible with Unstructured. It includes all of the required and recommended columns, as + If you specify a table name and it does not exist, Unstructured creates it with the standard schema. If a table name is not specified or already exists, Unstructured creates a table called `` with the following schema: + +```sql +CREATE MULTISET TABLE "elements" +( + "id" VARCHAR(256) NOT NULL, + "record_id" VARCHAR(1024) NOT NULL, + "element_id" VARCHAR(256) NOT NULL, + "text" CLOB CHARACTER SET UNICODE, + "type" VARCHAR(256), + "metadata" JSON +) +PRIMARY INDEX ("id"); + ``` + If you leave the table name blank, you must check the "Metadata as JSON" option in the UI or set `metadata_as_json` to "true" in the API. + + Here is a legacy example table schema that is compatible with Unstructured. It includes all of the required and recommended columns, as well as a few additional columns that are typically output by Unstructured as part of the `metadata` field. Be sure to replace `` with the name of the target database and `` with the name of the target table (by Unstructured convention, the table name is typically `elements`, but this is not a requirement). ```sql CREATE SET TABLE ""."" ( - "id" VARCHAR(64) NOT NULL, + "id" VARCHAR(256) NOT NULL, PRIMARY KEY ("id"), - "record_id" VARCHAR(64), - "element_id" VARCHAR(64), + "record_id" VARCHAR(1024), + "element_id" VARCHAR(256), "text" VARCHAR(32000) CHARACTER SET UNICODE, "type" VARCHAR(50), "embeddings" VARCHAR(64000), -- Add this column only if Unstructured is generating vector embeddings. @@ -87,7 +102,7 @@ "date_processed" VARCHAR(50), "permissions_data" VARCHAR(1000), "filesize_bytes" INTEGER, - "parent_id" VARCHAR(64) + "parent_id" VARCHAR(256) ) ``` diff --git a/support/docs.code-workspace b/support/docs.code-workspace new file mode 100644 index 00000000..2a0ed79b --- /dev/null +++ b/support/docs.code-workspace @@ -0,0 +1,7 @@ +{ + "folders": [ + { + "path": ".." + } + ] +} \ No newline at end of file From cc14a2073f53b89d17a2a9cfb84f0155fb061321 Mon Sep 17 00:00:00 2001 From: andrea-unstructured Date: Fri, 6 Mar 2026 12:41:55 -0500 Subject: [PATCH 2/5] updates to teradata SQL table schemas --- snippets/general-shared-text/teradata-sql.mdx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/snippets/general-shared-text/teradata-sql.mdx b/snippets/general-shared-text/teradata-sql.mdx index 30fdfb9f..ab9e1f47 100644 --- a/snippets/general-shared-text/teradata-sql.mdx +++ b/snippets/general-shared-text/teradata-sql.mdx @@ -61,7 +61,10 @@ to have Teradata generate the embeddings for you, instead of having Unstructured generate them. - If you specify a table name and it does not exist, Unstructured creates it with the standard schema. If a table name is not specified or already exists, Unstructured creates a table called `` with the following schema: + If you specify a table name and it does not exist, Unstructured creates it with the standard schema. If a table name is not specified or already exists, Unstructured creates a table called ``. + If you leave the table name blank, you must check the "Metadata as JSON" option in the UI or set `metadata_as_json` to "true" in the API. + +Standard schema ```sql CREATE MULTISET TABLE "elements" @@ -75,13 +78,14 @@ CREATE MULTISET TABLE "elements" ) PRIMARY INDEX ("id"); ``` - If you leave the table name blank, you must check the "Metadata as JSON" option in the UI or set `metadata_as_json` to "true" in the API. - Here is a legacy example table schema that is compatible with Unstructured. It includes all of the required and recommended columns, as + Following is a legacy example table schema that is compatible with Unstructured. It includes all of the required and recommended columns, as well as a few additional columns that are typically output by Unstructured as part of the `metadata` field. Be sure to replace `` with the name of the target database and `` with the name of the target table (by Unstructured convention, the table name is typically `elements`, but this is not a requirement). + Legacy schema + ```sql CREATE SET TABLE ""."" ( "id" VARCHAR(256) NOT NULL, From 7b42ed188d06d40e9c340d92b0a54366e11c91df Mon Sep 17 00:00:00 2001 From: andrea-unstructured Date: Fri, 6 Mar 2026 13:36:34 -0500 Subject: [PATCH 3/5] updated formatting --- snippets/general-shared-text/teradata-sql.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/general-shared-text/teradata-sql.mdx b/snippets/general-shared-text/teradata-sql.mdx index ab9e1f47..c43dadb8 100644 --- a/snippets/general-shared-text/teradata-sql.mdx +++ b/snippets/general-shared-text/teradata-sql.mdx @@ -62,7 +62,7 @@ If you specify a table name and it does not exist, Unstructured creates it with the standard schema. If a table name is not specified or already exists, Unstructured creates a table called ``. - If you leave the table name blank, you must check the "Metadata as JSON" option in the UI or set `metadata_as_json` to "true" in the API. + If you leave the table name blank, you must check the **Metadata as JSON** option in the UI or set `metadata_as_json` to **true** in the API. Standard schema From 759748adc1509b0de2b12b7242d32a3028581fba Mon Sep 17 00:00:00 2001 From: andrea-unstructured Date: Mon, 9 Mar 2026 12:50:25 -0400 Subject: [PATCH 4/5] updates to content --- snippets/general-shared-text/teradata-sql.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/general-shared-text/teradata-sql.mdx b/snippets/general-shared-text/teradata-sql.mdx index c43dadb8..ccdf4dd7 100644 --- a/snippets/general-shared-text/teradata-sql.mdx +++ b/snippets/general-shared-text/teradata-sql.mdx @@ -61,8 +61,8 @@ to have Teradata generate the embeddings for you, instead of having Unstructured generate them. - If you specify a table name and it does not exist, Unstructured creates it with the standard schema. If a table name is not specified or already exists, Unstructured creates a table called ``. - If you leave the table name blank, you must check the **Metadata as JSON** option in the UI or set `metadata_as_json` to **true** in the API. + If you specify a table name and it does not exist, Unstructured creates it with the standard schema. If a table name is not specified, Unstructured creates a table called ``. + If you leave the table name blank, you must check the **Metadata as JSON** option in the UI or set `metadata_as_json` to **true** in the API to use the table's metadata columns. Standard schema @@ -79,7 +79,7 @@ CREATE MULTISET TABLE "elements" PRIMARY INDEX ("id"); ``` - Following is a legacy example table schema that is compatible with Unstructured. It includes all of the required and recommended columns, as + The following legacy example table schema is used if you leave **Metadata as JSON** blank. It includes all of the required and recommended columns, as well as a few additional columns that are typically output by Unstructured as part of the `metadata` field. Be sure to replace `` with the name of the target database and `` with the name of the target table (by Unstructured convention, the table name is typically `elements`, but this is not a requirement). From 2dc33c78e23e193f6dcaa6ee9f47e55bcbad0eaa Mon Sep 17 00:00:00 2001 From: andrea-unstructured Date: Tue, 10 Mar 2026 14:52:20 -0400 Subject: [PATCH 5/5] clarified metadata choices --- snippets/general-shared-text/teradata-sql.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/general-shared-text/teradata-sql.mdx b/snippets/general-shared-text/teradata-sql.mdx index ccdf4dd7..9ea8fa8a 100644 --- a/snippets/general-shared-text/teradata-sql.mdx +++ b/snippets/general-shared-text/teradata-sql.mdx @@ -62,7 +62,7 @@ If you specify a table name and it does not exist, Unstructured creates it with the standard schema. If a table name is not specified, Unstructured creates a table called ``. - If you leave the table name blank, you must check the **Metadata as JSON** option in the UI or set `metadata_as_json` to **true** in the API to use the table's metadata columns. + If you leave the table name blank, you must check the **Metadata as JSON** option in the UI or set `metadata_as_json` to **true** in the API to use the table's metadata columns. If the metadata options are not chosen, Unstructured will apply the legacy schema. Standard schema @@ -79,7 +79,7 @@ CREATE MULTISET TABLE "elements" PRIMARY INDEX ("id"); ``` - The following legacy example table schema is used if you leave **Metadata as JSON** blank. It includes all of the required and recommended columns, as + The following legacy table schema is used if you leave **Metadata as JSON** blank or set it to **false** in the API. It includes all of the required and recommended columns, as well as a few additional columns that are typically output by Unstructured as part of the `metadata` field. Be sure to replace `` with the name of the target database and `` with the name of the target table (by Unstructured convention, the table name is typically `elements`, but this is not a requirement).