text
text ¶
DomoDataflow Text Actions
Text manipulation and formatting actions in Magic ETL v2. These correspond to the "Text" category in the Domo ETL UI sidebar.
DomoDataflow_Action_ConcatFields
dataclass
¶
DomoDataflow_Action_ConcatFields(
id: str,
action_type: str = None,
tile_type: str | None = None,
name: str = None,
depends_on: list[str] = None,
disabled: bool = False,
gui: dict = None,
settings: dict = None,
raw: dict = None,
parent_actions: list[DomoDataflow_Action_Base] = None,
fields: list[dict] = None,
separator: str = None,
target_field_name: str = None,
remove_selected_fields: bool = False,
input: str = None,
tables: list[dict] = None,
)
Bases: DomoDataflow_Action_Base
Concat Fields action - concatenates multiple columns into one.
Also known as "Combine Columns" in the Magic ETL UI.
Attributes:
| Name | Type | Description |
|---|---|---|
fields |
list[dict]
|
List of columns to concatenate |
separator |
str
|
Separator string between values |
target_field_name |
str
|
Name of the output column |
remove_selected_fields |
bool
|
Whether to remove source columns |
Example
concat_action = dataflow.get_action_objects("ConcatFields")[0] print(f"Combining {concat_action.source_columns} with '{concat_action.separator}'")
DomoDataflow_Action_ReplaceString
dataclass
¶
DomoDataflow_Action_ReplaceString(
id: str,
action_type: str = None,
tile_type: str | None = None,
name: str = None,
depends_on: list[str] = None,
disabled: bool = False,
gui: dict = None,
settings: dict = None,
raw: dict = None,
parent_actions: list[DomoDataflow_Action_Base] = None,
fields: list[dict] = None,
input: str = None,
tables: list[dict] = None,
)
Bases: DomoDataflow_Action_Base
Replace String action - replaces strings in columns.
Also known as "Replace Text" in the Magic ETL UI.
Attributes:
| Name | Type | Description |
|---|---|---|
fields |
list[dict]
|
List of replacement configurations |
Example
replace_action = dataflow.get_action_objects("ReplaceString")[0] for field in replace_action.fields: ... print(f"{field.get('name')}: {field.get('find')} -> {field.get('replace')}")
column_relationships
property
¶
column_relationships: set[ColumnRelationship]
Column relationships for ReplaceString (Replace Text) tile.
Each field is a column where text is replaced in-place.
DomoDataflow_Action_SplitColumn
dataclass
¶
DomoDataflow_Action_SplitColumn(
id: str,
action_type: str = None,
tile_type: str | None = None,
name: str = None,
depends_on: list[str] = None,
disabled: bool = False,
gui: dict = None,
settings: dict = None,
raw: dict = None,
parent_actions: list[DomoDataflow_Action_Base] = None,
source_column: str = None,
delimiter: str = None,
delimiter_type: str = None,
use_regex: bool = False,
additions: list[dict] = None,
combine_extra_splits: bool = False,
input: str = None,
tables: list[dict] = None,
)
Bases: DomoDataflow_Action_Base
Split Column action - splits a column into multiple columns.
Attributes:
| Name | Type | Description |
|---|---|---|
source_column |
str
|
Column to split |
delimiter |
str
|
Delimiter to split on |
delimiter_type |
str
|
Type of delimiter (STRING, REGEX, etc.) |
use_regex |
bool
|
Whether delimiter is a regex |
additions |
list[dict]
|
New columns to create from splits |
combine_extra_splits |
bool
|
Whether to combine extra splits into last column |
Example
split_action = dataflow.get_action_objects("SplitColumnAction")[0] print(f"Splitting {split_action.source_column} on '{split_action.delimiter}'")
DomoDataflow_Action_TextFormatting
dataclass
¶
DomoDataflow_Action_TextFormatting(
id: str,
action_type: str = None,
tile_type: str | None = None,
name: str = None,
depends_on: list[str] = None,
disabled: bool = False,
gui: dict = None,
settings: dict = None,
raw: dict = None,
parent_actions: list[DomoDataflow_Action_Base] = None,
fields: list[dict] = None,
input: str = None,
tables: list[dict] = None,
)
Bases: DomoDataflow_Action_Base
Text Formatting action - applies text formatting transformations.
Attributes:
| Name | Type | Description |
|---|---|---|
fields |
list[dict]
|
List of text formatting configurations |
Example
text_action = dataflow.get_action_objects("TextFormatting")[0] for field in text_action.fields: ... print(f"{field.get('name')}: {field.get('operation')}")
column_relationships
property
¶
column_relationships: set[ColumnRelationship]
Column relationships for TextFormatting tile.
Each field is a column where text formatting is applied in-place.