Operation extract.date_array.from.table in plugin tabular v0.5.2
Extract a date array from a table column.
Author(s) | Markus Binsteiner (markus@frkl.io) |
Operation type | pipeline |
Inputs
Name | Description | Type | Required? | Default |
---|---|---|---|---|
column_name | The name of the column to extract. | string | true | null |
table | A table. | table | true | null |
parse_date_array__max_index | The maximum index until whic to parse the string(s). | integer | false | null |
parse_date_array__min_index | The minimum index from where to start parsing the string(s). | integer | false | null |
parse_date_array__remove_tokens | A list of tokens/characters to replace with a single white-space before parsing the input. | list | false | null |
parse_date_array__force_non_null | If set to 'True', raise an error if any of the strings in the array can't be parsed. | boolean | false | true |
Outputs
Name | Description | Type | Required? | Default |
---|---|---|---|---|
date_array | The resulting array with items of a date data type. | array | true | null |
Module configuration
Module pipeline
With configuration options:
constants | {} |
context | {} |
defaults | {} |
doc | {
"description": "Extract a date array from a table column.",
"doc": null
} |
input_aliases | {
"pick_column.table": "table",
"pick_column.column_name": "column_name"
} |
output_aliases | {
"parse_date_array.date_array": "date_array"
} |
pipeline_name | "extract.date_array.from.table" |
steps | [
{
"module_type": "table.pick.column",
"module_config": {},
"is_resolved": false,
"step_id": "pick_column",
"manifest_src": {
"module_type": "table.pick.column",
"module_config": {},
"is_resolved": false
},
"input_links": {},
"module_details": {
"python_class_name": "PickColumnModule",
"python_module_name": "kiara_plugin.tabular.modules.table",
"full_name": "kiara_plugin.tabular.modules.table.PickColumnModule",
"module_config": {
"constants": {},
"defaults": {},
"column_name": null
},
"inputs_schema": {
"table": {
"type": "table",
"type_config": {},
"default": null,
"optional": false,
"is_constant": false,
"doc": {
"description": "A table.",
"doc": null
}
},
"column_name": {
"type": "string",
"type_config": {},
"default": null,
"optional": false,
"is_constant": false,
"doc": {
"description": "The name of the column to extract.",
"doc": null
}
}
},
"outputs_schema": {
"array": {
"type": "array",
"type_config": {},
"default": null,
"optional": false,
"is_constant": false,
"doc": {
"description": "The column.",
"doc": null
}
}
}
},
"doc": {
"description": "Pick one column from a table, returning an array.",
"doc": null
}
},
{
"module_type": "parse.date_array",
"module_config": {},
"is_resolved": false,
"step_id": "parse_date_array",
"manifest_src": {
"module_type": "parse.date_array",
"module_config": {},
"is_resolved": false
},
"input_links": {
"array": [
{
"step_id": "pick_column",
"value_name": "array",
"sub_value": null
}
]
},
"module_details": {
"python_class_name": "ExtractDateModule",
"python_module_name": "kiara_plugin.tabular.modules.array",
"full_name": "kiara_plugin.tabular.modules.array.ExtractDateModule",
"module_config": {
"constants": {},
"defaults": {},
"add_inputs": true,
"input_fields": [],
"force_non_null": true,
"min_index": null,
"max_index": null,
"remove_tokens": []
},
"inputs_schema": {
"array": {
"type": "array",
"type_config": {},
"default": null,
"optional": false,
"is_constant": false,
"doc": {
"description": "The input array.",
"doc": null
}
},
"force_non_null": {
"type": "boolean",
"type_config": {},
"default": true,
"optional": true,
"is_constant": false,
"doc": {
"description": "If set to 'True', raise an error if any of the strings in the array can't be parsed.",
"doc": null
}
},
"min_index": {
"type": "integer",
"type_config": {},
"default": null,
"optional": true,
"is_constant": false,
"doc": {
"description": "The minimum index from where to start parsing the string(s).",
"doc": null
}
},
"max_index": {
"type": "integer",
"type_config": {},
"default": null,
"optional": true,
"is_constant": false,
"doc": {
"description": "The maximum index until whic to parse the string(s).",
"doc": null
}
},
"remove_tokens": {
"type": "list",
"type_config": {},
"default": null,
"optional": true,
"is_constant": false,
"doc": {
"description": "A list of tokens/characters to replace with a single white-space before parsing the input.",
"doc": null
}
}
},
"outputs_schema": {
"date_array": {
"type": "array",
"type_config": {},
"default": null,
"optional": false,
"is_constant": false,
"doc": {
"description": "The resulting array with items of a date data type.",
"doc": null
}
}
}
},
"doc": {
"description": "Create an array of date objects from an array of strings.",
"doc": "This module is very simplistic at the moment, more functionality and options will be added in the future.\n\nAt its core, this module uses the standard parser from the\n[dateutil](https://github.com/dateutil/dateutil) package to parse strings into dates. As this parser can't handle\n complex strings, the input strings can be pre-processed in the following ways:\n\n- 'cut' non-relevant parts of the string (using 'min_index' & 'max_index' input/config options)\n- remove matching tokens from the string, and replace them with a single whitespace (using the 'remove_tokens' option)\n\nBy default, if an input string can't be parsed this module will raise an exception. This can be prevented by\nsetting this modules 'force_non_null' config option or input to 'False', in which case un-parsable strings\nwill appear as 'NULL' value in the resulting array."
}
}
] |