Python function (python)¶
YAML location: an entry in a flowgroup’s actions list.
Source selector: source.type: python.
Calls a Python function that returns a DataFrame. Fields live under
source:.
Minimal example¶
Add this entry to the actions list in your flowgroup.
- name: load_external
type: load
source:
type: python
module_path: "loaders/external.py"
function_name: get_df
parameters:
region: "${region}"
target: v_external
Source fields¶
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
Yes |
— |
Must be |
|
string |
Yes |
— |
Path to a |
|
string |
No |
|
Entry function, called as |
|
mapping |
No |
|
Passed as the function’s second argument. |
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. |