Skip to content

Commit 86b4d47

Browse files
committed
updated
1 parent 30b514d commit 86b4d47

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

components/databricks/actions/create-vector-search-index/create-vector-search-index.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555
type: "string[]",
5656
label: "Embedding Source Columns",
5757
description:
58-
"List of embedding source column configs. Each entry is a JSON object string like `{ \"embedding_model_endpoint_name\": \"e5-small-v2\", \"name\": \"text\" }`. Provide when Databricks computes embeddings (DELTA_SYNC).",
58+
"List of embedding source column configs. Each entry is a JSON object string like `{ \"embedding_model_endpoint_name\": \"e5-small-v2\", \"name\": \"text\" }`.",
5959
optional: true,
6060
},
6161
schemaJson: {
@@ -87,6 +87,11 @@ export default {
8787
};
8888

8989
if (this.indexType === "DELTA_SYNC") {
90+
if (this.schemaJson) {
91+
throw new ConfigurationError(
92+
"`Schema JSON` is not allowed when indexType is DELTA_SYNC.",
93+
);
94+
}
9095
if (!this.sourceTable) {
9196
throw new ConfigurationError(
9297
"sourceTable is required when indexType is DELTA_SYNC.",
@@ -129,6 +134,11 @@ export default {
129134
}
130135

131136
else if (this.indexType === "DIRECT_ACCESS") {
137+
if (this.sourceTable || this.columnsToSync?.length) {
138+
throw new ConfigurationError(
139+
"`Source Table`,`Embedding Source Columns` and `Columns to Sync` are not allowed when indexType is DIRECT_ACCESS.",
140+
);
141+
}
132142
if (!this.schemaJson) {
133143
throw new ConfigurationError(
134144
"schemaJson is required when indexType is DIRECT_ACCESS.",

0 commit comments

Comments
 (0)