diff --git a/runtime/drivers/bigquery/bigquery.go b/runtime/drivers/bigquery/bigquery.go index 4aa2198edf8..68bd9ef3119 100644 --- a/runtime/drivers/bigquery/bigquery.go +++ b/runtime/drivers/bigquery/bigquery.go @@ -213,6 +213,9 @@ func parseSourceProperties(props map[string]any) (*sourceProperties, error) { if err != nil { return nil, err } + if conf.SQL == "" { + return nil, fmt.Errorf("property 'sql' is mandatory for connector \"bigquery\"") + } if conf.ProjectID == "" { conf.ProjectID = bigquery.DetectProjectID } diff --git a/runtime/drivers/duckdb/transporter/motherduck_to_duckDB.go b/runtime/drivers/duckdb/transporter/motherduck_to_duckDB.go index 7e051991fc1..1e6961d7aa2 100644 --- a/runtime/drivers/duckdb/transporter/motherduck_to_duckDB.go +++ b/runtime/drivers/duckdb/transporter/motherduck_to_duckDB.go @@ -114,7 +114,7 @@ func (t *motherduckToDuckDB) Transfer(ctx context.Context, srcProps, sinkProps m } if srcCfg.SQL == "" { - return fmt.Errorf("property \"query\" is mandatory for connector \"motherduck\"") + return fmt.Errorf("property \"sql\" is mandatory for connector \"motherduck\"") } userQuery := strings.TrimSpace(srcCfg.SQL) diff --git a/runtime/drivers/duckdb/transporter/utils.go b/runtime/drivers/duckdb/transporter/utils.go index c1d8f93d57a..5a816390e24 100644 --- a/runtime/drivers/duckdb/transporter/utils.go +++ b/runtime/drivers/duckdb/transporter/utils.go @@ -10,7 +10,7 @@ import ( ) type sourceProperties struct { - Database string `mapstructure:"database"` + Database string `mapstructure:"db"` SQL string `mapstructure:"sql"` } @@ -19,6 +19,9 @@ func parseSourceProperties(props map[string]any) (*sourceProperties, error) { if err := mapstructure.Decode(props, cfg); err != nil { return nil, fmt.Errorf("failed to parse source properties: %w", err) } + if cfg.SQL == "" { + return nil, fmt.Errorf("property 'sql' is mandatory") + } return cfg, nil }