On this page

JDBC database (jdbc)

YAML location: an entry in a flowgroup’s actions list. Source selector: source.type: jdbc.

Reads from an external database over JDBC. Fields live under source:.

Minimal example

Add this entry to the actions list in your flowgroup.

- name: load_jdbc
  type: load
  source:
    type: jdbc
    url: "jdbc:postgresql://host:5432/db"
    user: "${secret:db/user}"
    password: "${secret:db/password}"
    driver: org.postgresql.Driver
    table: public.orders
  target: v_orders

Source fields

Field

Type

Required

Default

Description

type

string

Yes

—

Must be jdbc.

url

string

Yes

—

JDBC URL.

user

string

Yes

—

Username; supply via ${secret:scope/key}.

password

string

Yes

—

Password; supply via ${secret:scope/key}.

driver

string

Yes

—

JDBC driver class.

table

string

One of

—

Table name. Supply table or query; when both are set, query wins.

query

string

One of

—

SQL query. Supply query or table.

Action-level fields

These fields apply to every load sub-type. name, type, source and target are required.

Field

Type

Required

Default

Description

name

string

Yes

—

Unique action name within the flowgroup.

type

string

Yes

—

Always load.

source

mapping

Yes

—

Source configuration. source.type selects the sub-type. Use a mapping for every load type, including SQL.

target

string

Yes

—

Name of the temporary view this action creates.

readMode

string

No

sub-type

batch or stream; selects spark.read vs spark.readStream. Default and constraints vary by sub-type (below). Ignored by sql, python, and jdbc. The view this action creates is a stream or a batch view, and later actions in the flowgroup must read it the same way (LHP-VAL-070); see Read mode.

description

string

No

auto

Docstring for the generated view function.

operational_metadata

bool or list[string]

No

—

Explicit column names to add; action-level false disables inherited selection. true alone adds no columns. See Operational metadata.

depends_on

list[string]

No

—

Extra upstream table or view references added to the dependency graph. See Dependency analysis reference.

See the worked guide or choose another load source.

The JDBC generator uses the fields listed above. It does not forward an arbitrary source.options mapping; use a Python loader when the connection requires reader options beyond this interface.