Module parse.date_array in plugin tabular v0.5.3
Create an array of date objects from an array of strings.
This module is very simplistic at the moment, more functionality and options will be added in the future.
At its core, this module uses the standard parser from the dateutil package to parse strings into dates. As this parser can't handle complex strings, the input strings can be pre-processed in the following ways:
- 'cut' non-relevant parts of the string (using 'min_index' & 'max_index' input/config options)
- remove matching tokens from the string, and replace them with a single whitespace (using the 'remove_tokens' option)
By default, if an input string can't be parsed this module will raise an exception. This can be prevented by setting this modules 'force_non_null' config option or input to 'False', in which case un-parsable strings will appear as 'NULL' value in the resulting array.
Author(s) | Markus Binsteiner (markus@frkl.io) |
Tags | tabular |
Python class | kiara_plugin.tabular.modules.array.ExtractDateModule |
Module configuration options
Configuration class: kiara_plugin.tabular.modules.array.ExtractDateConfig
Name | Description | Type | Required? | Default |
---|---|---|---|---|
constants | Value constants for this module. | object | false | null |
defaults | Value defaults for this module. | object | false | null |
input_fields | If not empty, only add the fields specified in here to the module inputs schema. | array | false | null |
max_index | The maximum index until whic to parse the string(s). | anyOf: [{'type': 'integer'}, {'type': 'null'}] | false | null |
min_index | The minimum index from where to start parsing the string(s). | anyOf: [{'type': 'integer'}, {'type': 'null'}] | false | null |
remove_tokens | A list of tokens/characters to replace with a single white-space before parsing the input. | array | false | null |
add_inputs | If set to 'True', parse options will be available as inputs. | boolean | false | true |
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 |