DB Source(s) should support basic mode of operation for simple use cases

Description

The DB source(s) should have a new setting: Mode. It should have two options: ‘basic’ and ‘advanced’ (default, for backward compatibility). It should be displayed as a radio button.
Basic Mode
When basic mode is selected, the following additional properties should be shown:
1. Table Name
2. Columns (defaults to all)
3. Filters (defaults to none)

Property

Description

Widget

Optional

Default

Table Name

The name of the table to read data from. This table should exist in the specified database (Macro-enabled)

Textbox

Yes (but should throw a validation error if the mode is basic and the property is null or empty)

None

Columns

The columns to read from the specified table. (Macro-enabled)

CSV

Yes

All/*

Filters

A set of where clauses to apply to the query to filter the rows. (Macro-enabled)

CSV

Yes

Empty

Additionally, the Import Query config should be hidden when the mode is Basic.

Advanced
The Advanced mode should be default, and should behave as of today, where the user sees an import query.

This improvement should be added to all the specific database sources.

In ‘basic’ mode, we would not ask for a query and would instead have separate fields for database name, table name, filter, split field, etc (much like the BQ source. This actually more natural when we look at the connection → pipeline use case, where the user has specified a database and table name, but not a query anywhere). In ‘advanced’ mode we would have the option to specify a query, but if you happen to give a complex one with macros then we may not be able to generate a schema.

Release Notes

None
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Bhooshan Mogal