TableColumnTagToRowExtractor
Transformer to extract values of tags into in new rows that are appended to the end of the table.
Multiple tag keys can be provided to extract multiple tags (one row is created by tag key).
Example
Let's say you have the following table, the first row does not really exist in the table, it is just to show the tags of the columns.
Row name | A | B |
---|---|---|
Column tags | Gender : M | Gender : F |
0 | 1 | 5 |
1 | 2 | 6 |
Here is the result of the extraction of the Gender
tag.
Row name | A | B |
---|---|---|
Column tags | Gender : M | Gender : F |
0 | 1 | 5 |
1 | 2 | 6 |
Gender | M | F |
A new row is created containing the values of the Gender
tag.
Attributes
config_specs: Dict
file_downloader: FileDownloader
input_name: str
input_specs: InputSpecs
message_dispatcher: MessageDispatcher
output_name: str
output_specs: OutputSpecs
style: TypingStyle
Functions
Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters
This can be overwritten to perform custom check before running task. See doc of CheckBeforeTaskResult for more information
Name | Type | Default value | Description |
---|---|---|---|
params | ConfigParams | ||
inputs | TaskInputs |
CheckBeforeTaskResult |
Override this method to implement convert method
Name | Type | Default value | Description |
---|---|---|---|
source | Resource | ||
params | ConfigParams | [description] | |
target_type | Type | [description] [resource] |
Resource |
Create a temporary directory. This directory will be deleted after the task is run. Output file or folder are moved out of this directory before it is deleted.
str |
Name | Type | Default value | Description |
---|---|---|---|
spec_name | str |
Type |
This can be overwritten to perform custom initialization of the task. This method is called just after the init and before the check_before_run method
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Store a message in the progress
Name | Type | Default value | Description |
---|---|---|---|
message | str | Message to store in the progress | |
type_ | MessageLevel |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Name | Type | Default value | Description |
---|---|---|---|
message | str |
This must be overiwritten to perform the task of the task.
This is where most of your code must go
Name | Type | Default value | Description |
---|---|---|---|
params | ConfigParams | [description] config | |
inputs | TaskInputs | [description] input |
Dict |
This can be overwritten to perform action after the task run. This method is called after the resources are saved. This method is useful to delete temporary objects (like files) to clear the server after the task is run.
Override this method to write the Transformer code
Name | Type | Default value | Description |
---|---|---|---|
source | Table | Resource to modifify, the source object can be directly modify as this is already a new copy resource | |
params | ConfigParams | Params for the transform |
Table |
Update the progress value
Name | Type | Default value | Description |
---|---|---|---|
value | float | Value between 0 and 100 of the progress | |
message | str | If provided a message is stored on the progress |
Call the ResourceExporter method manually
Name | Type | Default value | Description |
---|---|---|---|
source | Resource | ||
params | Dict | Params for the import_from_path_method configparams |
Resource |
Returns the name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | True to slugify the class name if true, defaults to false , optional |
snakefy | bool | False | True to snakefy the class name if true, defaults to false , optional |
replace_uppercase | bool | False | Replace upper cases by "-" if true, defaults to false , optional |
str |
Name | Type | Default value | Description |
---|---|---|---|
decorator_name | Any |
Returns the full name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | Slugify the returned class name if true, defaults to false , optional |
snakefy | bool | False | Snakefy the returned class name if true, defaults to false `` |
str |
str |
Returns the name of the first compatible input for the given resource types Returns None if no compatible input is found
Name | Type | Default value | Description |
---|---|---|---|
resource_types | List |
bool |
Returns the name of the first compatible output for the given resource types Returns None if no compatible output is found
Name | Type | Default value | Description |
---|---|---|---|
resource_types | List |
bool |
Get the human name of the resource
str |
Returns the input specs of the process
InputSpecs |
Returns the input specs of the process
OutputSpecs |
Get the short description of the resource
str |
Get the type of the input source
Tuple |
Get the type of the output target
Type |
Get the typing name of the resource
str |
Get all the classes that inherit this class
List |
Returns the list of the methods
List |
Returns the module name of the class
str |
Retrieves the property names
Name | Type | Default value | Description |
---|---|---|---|
instance | type | The s of the properties to retrieve. set `none` to retrieve all. `type` or `union[type]` | |
exclude | type |
List |