On this page
Custom DataSource (custom_datasource)¶
YAML location: an entry in a flowgroup’s actions list.
Source selector: source.type: custom_datasource.
Reads through a user-supplied PySpark DataSource class. Fields live under
source:.
Minimal example¶
Add this entry to the actions list in your flowgroup.
- name: load_custom
type: load
source:
type: custom_datasource
module_path: "sources/my_source.py"
custom_datasource_class: MyDataSource
options:
endpoint: "${api_endpoint}"
target: v_custom
Source fields¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
Yes |
— |
Must be |
|
string |
Yes |
— |
Path to the |
|
string |
Yes |
— |
Name of the |
|
mapping |
No |
|
Passed to the reader as |
readMode defaults to stream; batch is also supported. The class’s
name() classmethod return value is used as the .format(...) name.
Action-level fields¶
These fields apply to every load sub-type. name, type, source and target are required.
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
Yes |
— |
Unique action name within the flowgroup. |
|
string |
Yes |
— |
Always |
|
mapping |
Yes |
— |
Source configuration. |
|
string |
Yes |
— |
Name of the temporary view this action creates. |
|
string |
No |
sub-type |
|
|
string |
No |
auto |
Docstring for the generated view function. |
|
bool or list[string] |
No |
— |
Explicit column names to add; action-level |
|
list[string] |
No |
— |
Extra upstream table or view references added to the dependency graph. See Dependency analysis reference. |