diff --git a/runtime/drivers/athena/athena.go b/runtime/drivers/athena/athena.go
index 3019e14c426..d9d54aa63c5 100644
--- a/runtime/drivers/athena/athena.go
+++ b/runtime/drivers/athena/athena.go
@@ -34,25 +34,20 @@ var spec = drivers.Spec{
DocsURL: "https://docs.rilldata.com/reference/connectors/athena",
ConfigProperties: []*drivers.PropertySpec{
{
- Key: "aws_access_key_id",
- Type: drivers.StringPropertyType,
- Secret: true,
+ Key: "aws_access_key_id",
+ Type: drivers.StringPropertyType,
+ DisplayName: "AWS access key ID",
+ Description: "AWS access key ID",
+ Required: true,
+ Secret: true,
},
{
- Key: "aws_secret_access_key",
- Type: drivers.StringPropertyType,
- Secret: true,
- },
- },
- // Important: Any edits to the below properties must be accompanied by changes to the client-side form validation schemas.
- SourceProperties: []*drivers.PropertySpec{
- {
- Key: "sql",
+ Key: "aws_secret_access_key",
Type: drivers.StringPropertyType,
+ DisplayName: "AWS secret access key",
+ Description: "AWS secret access key",
Required: true,
- DisplayName: "SQL",
- Description: "Query to extract data from Athena.",
- Placeholder: "select * from catalog.table;",
+ Secret: true,
},
{
Key: "output_location",
@@ -60,30 +55,6 @@ var spec = drivers.Spec{
DisplayName: "S3 output location",
Description: "An output location for query result is required either through the workgroup result configuration setting or set here.",
Placeholder: "s3://bucket-name/path/",
- Required: false,
- },
- {
- Key: "workgroup",
- Type: drivers.StringPropertyType,
- DisplayName: "AWS Athena workgroup",
- Description: "AWS Athena workgroup to use for queries. Default is primary",
- Placeholder: "primary",
- Required: false,
- },
- {
- Key: "region",
- Type: drivers.StringPropertyType,
- DisplayName: "AWS region",
- Description: "AWS region to connect to Athena and the output location.",
- Placeholder: "us-east-1",
- Required: false,
- },
- {
- Key: "name",
- Type: drivers.StringPropertyType,
- DisplayName: "Source name",
- Description: "The name of the source",
- Placeholder: "my_new_source",
Required: true,
},
},
diff --git a/runtime/drivers/bigquery/bigquery.go b/runtime/drivers/bigquery/bigquery.go
index a0a8db17349..0dee5df4771 100644
--- a/runtime/drivers/bigquery/bigquery.go
+++ b/runtime/drivers/bigquery/bigquery.go
@@ -28,53 +28,22 @@ var spec = drivers.Spec{
DocsURL: "https://docs.rilldata.com/reference/connectors/bigquery",
ConfigProperties: []*drivers.PropertySpec{
{
- Key: "google_application_credentials",
- Type: drivers.FilePropertyType,
- Hint: "Enter path of file to load from.",
+ Key: "google_application_credentials",
+ Type: drivers.InformationalPropertyType,
+ DisplayName: "GCP credentials",
+ Description: "GCP credentials inferred from your local environment.",
+ Hint: "Set your local credentials: gcloud auth application-default login
Click to learn more.",
+ DocsURL: "https://docs.rilldata.com/reference/connectors/gcs#local-credentials",
},
{
Key: "project_id",
Type: drivers.StringPropertyType,
Required: false,
DisplayName: "Project ID",
- Description: "Default Google project ID.",
- },
- },
- // Important: Any edits to the below properties must be accompanied by changes to the client-side form validation schemas.
- SourceProperties: []*drivers.PropertySpec{
- {
- Key: "sql",
- Type: drivers.StringPropertyType,
- Required: true,
- DisplayName: "SQL",
- Description: "Query to extract data from BigQuery.",
- Placeholder: "select * from project.dataset.table;",
- },
- {
- Key: "project_id",
- Type: drivers.StringPropertyType,
- Required: true,
- DisplayName: "Project ID",
Description: "Google project ID.",
Placeholder: "my-project",
Hint: "Rill will use the project ID from your local credentials, unless set here. Set this if no project ID configured in credentials.",
},
- {
- Key: "name",
- Type: drivers.StringPropertyType,
- DisplayName: "Source name",
- Description: "The name of the source",
- Placeholder: "my_new_source",
- Required: true,
- },
- {
- Key: "google_application_credentials",
- Type: drivers.InformationalPropertyType,
- DisplayName: "GCP credentials",
- Description: "GCP credentials inferred from your local environment.",
- Hint: "Set your local credentials: gcloud auth application-default login
Click to learn more.",
- DocsURL: "https://docs.rilldata.com/reference/connectors/gcs#local-credentials",
- },
},
ImplementsWarehouse: true,
}
diff --git a/runtime/drivers/mysql/mysql.go b/runtime/drivers/mysql/mysql.go
index 97211ff7e4a..1095ee5fa92 100644
--- a/runtime/drivers/mysql/mysql.go
+++ b/runtime/drivers/mysql/mysql.go
@@ -36,32 +36,16 @@ var spec = drivers.Spec{
},
// Important: Any edits to the below properties must be accompanied by changes to the client-side form validation schemas.
SourceProperties: []*drivers.PropertySpec{
- {
- Key: "sql",
- Type: drivers.StringPropertyType,
- Required: true,
- DisplayName: "SQL",
- Description: "Query to extract data from MySQL.",
- Placeholder: "select * from table;",
- },
{
Key: "dsn",
Type: drivers.StringPropertyType,
DisplayName: "MySQL Connection String",
- Required: false,
+ Required: true,
DocsURL: "https://dev.mysql.com/doc/refman/8.4/en/connecting-using-uri-or-key-value-pairs.html#connecting-using-uri",
Placeholder: "mysql://user:password@host:3306/my-db",
Hint: "Can be configured here or by setting the 'connector.mysql.dsn' environment variable (using '.env' or '--env')",
Secret: true,
},
- {
- Key: "name",
- Type: drivers.StringPropertyType,
- DisplayName: "Source name",
- Description: "The name of the source",
- Placeholder: "my_new_source",
- Required: true,
- },
},
ImplementsSQLStore: true,
}
diff --git a/runtime/drivers/postgres/postgres.go b/runtime/drivers/postgres/postgres.go
index dbb5f599fe5..3fb223075e9 100644
--- a/runtime/drivers/postgres/postgres.go
+++ b/runtime/drivers/postgres/postgres.go
@@ -35,32 +35,16 @@ var spec = drivers.Spec{
},
// Important: Any edits to the below properties must be accompanied by changes to the client-side form validation schemas.
SourceProperties: []*drivers.PropertySpec{
- {
- Key: "sql",
- Type: drivers.StringPropertyType,
- Required: true,
- DisplayName: "SQL",
- Description: "Query to extract data from Postgres.",
- Placeholder: "select * from table;",
- },
{
Key: "database_url",
Type: drivers.StringPropertyType,
DisplayName: "Postgres Connection String",
- Required: false,
+ Required: true,
DocsURL: "https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING",
Placeholder: "postgresql://postgres:postgres@localhost:5432/postgres",
Hint: "Can be configured here or by setting the 'connector.postgres.database_url' environment variable (using '.env' or '--env')",
Secret: true,
},
- {
- Key: "name",
- Type: drivers.StringPropertyType,
- DisplayName: "Source name",
- Description: "The name of the source",
- Placeholder: "my_new_source",
- Required: true,
- },
},
ImplementsSQLStore: true,
}
diff --git a/runtime/drivers/redshift/redshift.go b/runtime/drivers/redshift/redshift.go
index 2a30d4fa574..b629960805c 100644
--- a/runtime/drivers/redshift/redshift.go
+++ b/runtime/drivers/redshift/redshift.go
@@ -31,33 +31,20 @@ var spec = drivers.Spec{
DocsURL: "https://docs.rilldata.com/reference/connectors/redshift",
ConfigProperties: []*drivers.PropertySpec{
{
- Key: "aws_access_key_id",
- Type: drivers.StringPropertyType,
- Secret: true,
- },
- {
- Key: "aws_secret_access_key",
- Type: drivers.StringPropertyType,
- Secret: true,
- },
- },
- // Important: Any edits to the below properties must be accompanied by changes to the client-side form validation schemas.
- SourceProperties: []*drivers.PropertySpec{
- {
- Key: "sql",
+ Key: "aws_access_key_id",
Type: drivers.StringPropertyType,
+ DisplayName: "AWS access key ID",
+ Description: "AWS access key ID",
Required: true,
- DisplayName: "SQL",
- Description: "Query to extract data from Redshift.",
- Placeholder: "select * from public.table;",
+ Secret: true,
},
{
- Key: "output_location",
+ Key: "aws_secret_access_key",
Type: drivers.StringPropertyType,
- DisplayName: "S3 output location",
- Description: "Output location in S3 for temporary data.",
- Placeholder: "s3://bucket-name/path/",
+ DisplayName: "AWS secret access key",
+ Description: "AWS secret access key",
Required: true,
+ Secret: true,
},
{
Key: "workgroup",
@@ -83,31 +70,33 @@ var spec = drivers.Spec{
Placeholder: "dev",
Required: true,
},
- {
- Key: "cluster_identifier",
- Type: drivers.StringPropertyType,
- DisplayName: "Redshift cluster identifier",
- Description: "Redshift cluster identifier",
- Placeholder: "redshift-cluster-1",
- Required: false,
- },
- {
- Key: "role_arn",
- Type: drivers.StringPropertyType,
- DisplayName: "Redshift role ARN",
- Description: "Redshift role ARN",
- Placeholder: "arn:aws:iam::03214372:role/service-role/AmazonRedshift-CommandsAccessRole-20240307T203902",
- Required: true,
- },
- {
- Key: "name",
- Type: drivers.StringPropertyType,
- DisplayName: "Source name",
- Description: "The name of the source",
- Placeholder: "my_new_source",
- Required: true,
- },
},
+ // SourceProperties: []*drivers.PropertySpec{
+ // {
+ // Key: "output_location",
+ // Type: drivers.StringPropertyType,
+ // DisplayName: "S3 output location",
+ // Description: "Output location in S3 for temporary data.",
+ // Placeholder: "s3://bucket-name/path/",
+ // Required: true,
+ // },
+ // {
+ // Key: "cluster_identifier",
+ // Type: drivers.StringPropertyType,
+ // DisplayName: "Redshift cluster identifier",
+ // Description: "Redshift cluster identifier",
+ // Placeholder: "redshift-cluster-1",
+ // Required: false,
+ // },
+ // {
+ // Key: "role_arn",
+ // Type: drivers.StringPropertyType,
+ // DisplayName: "Redshift role ARN",
+ // Description: "Redshift role ARN",
+ // Placeholder: "arn:aws:iam::03214372:role/service-role/AmazonRedshift-CommandsAccessRole-20240307T203902",
+ // Required: true,
+ // },
+ // },
ImplementsWarehouse: true,
}
diff --git a/web-common/src/features/sources/modal/AddDataModal.svelte b/web-common/src/features/sources/modal/AddDataModal.svelte
index cbd7d3381ae..11811fa95af 100644
--- a/web-common/src/features/sources/modal/AddDataModal.svelte
+++ b/web-common/src/features/sources/modal/AddDataModal.svelte
@@ -39,34 +39,13 @@
import DuplicateSource from "./DuplicateSource.svelte";
import LocalSourceUpload from "./LocalSourceUpload.svelte";
import RequestConnectorForm from "./RequestConnectorForm.svelte";
+ import { OLAP_ENGINES, SORT_ORDER, SOURCES } from "./constants";
let step = 0;
let selectedConnector: null | V1ConnectorDriver = null;
let requestConnector = false;
let isSubmittingForm = false;
- const SOURCES = [
- "gcs",
- "s3",
- "azure",
- "bigquery",
- "athena",
- "redshift",
- "duckdb",
- "motherduck",
- "postgres",
- "mysql",
- "sqlite",
- "snowflake",
- "salesforce",
- "local_file",
- "https",
- ];
-
- const OLAP_CONNECTORS = ["clickhouse", "druid", "pinot"];
-
- const SORT_ORDER = [...SOURCES, ...OLAP_CONNECTORS];
-
const ICONS = {
gcs: GoogleCloudStorage,
s3: AmazonS3,
@@ -96,10 +75,10 @@
data.connectors &&
data.connectors
.filter(
- // Only show connectors in SOURCES or OLAP_CONNECTORS
+ // Only show connectors in SOURCES or OLAP_ENGINES
(a) =>
a.name &&
- (SOURCES.includes(a.name) || OLAP_CONNECTORS.includes(a.name)),
+ (SOURCES.includes(a.name) || OLAP_ENGINES.includes(a.name)),
)
.sort(
// CAST SAFETY: we have filtered out any connectors that
@@ -173,6 +152,11 @@
$: isModelingSupportedForDefaultOlapDriver =
useIsModelingSupportedForDefaultOlapDriver($runtime.instanceId);
$: isModelingSupported = $isModelingSupportedForDefaultOlapDriver.data;
+
+ $: isConnectorType =
+ selectedConnector?.implementsOlap ||
+ selectedConnector?.implementsSqlStore ||
+ selectedConnector?.implementsWarehouse;
{#if step >= 1 || $duplicateSourceName}
@@ -221,7 +205,7 @@