Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DuckDB connector form #5162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions web-common/src/features/sources/modal/yupSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ export function getYupSchema(connector: V1ConnectorDriver) {
.required("Source name is required"),
});

case "duckdb":
return yup.object().shape({
db: yup.string().required("db is required"),
sourceName: yup
.string()
.matches(VALID_NAME_PATTERN, INVALID_NAME_MESSAGE)
.required("Source name is required"),
});

case "sqlite":
return yup.object().shape({
db: yup.string().required("db is required"),
Expand Down Expand Up @@ -156,7 +147,7 @@ export function getYupSchema(connector: V1ConnectorDriver) {

case "clickhouse":
return yup.object().shape({
// User-provided names requires a little refactor. Commenting out for now.
// User-provided connector names requires a little refactor. Commenting out for now.
// sourceName: yup
// .string()
// .matches(VALID_NAME_PATTERN, INVALID_NAME_MESSAGE)
Expand All @@ -170,7 +161,7 @@ export function getYupSchema(connector: V1ConnectorDriver) {

case "druid":
return yup.object().shape({
// User-provided names requires a little refactor. Commenting out for now.
// User-provided connector names requires a little refactor. Commenting out for now.
// sourceName: yup
// .string()
// .matches(VALID_NAME_PATTERN, INVALID_NAME_MESSAGE)
Expand All @@ -182,9 +173,19 @@ export function getYupSchema(connector: V1ConnectorDriver) {
ssl: yup.boolean(),
});

case "duckdb":
return yup.object().shape({
// User-provided connector names requires a little refactor. Commenting out for now.
// sourceName: yup
// .string()
// .matches(VALID_NAME_PATTERN, INVALID_NAME_MESSAGE)
// .required("Source name is required"),
db: yup.string().required("db is required"),
});

case "pinot":
return yup.object().shape({
// User-provided names requires a little refactor. Commenting out for now.
// User-provided connector names requires a little refactor. Commenting out for now.
// sourceName: yup
// .string()
// .matches(VALID_NAME_PATTERN, INVALID_NAME_MESSAGE)
Expand Down
Loading