Back to bricks list
Introduction
Technical Documentation
Tasks
Table importer
Version

Table importer

IMPORTER
Typing name :  TASK.gws_core.TableImporter Brick :  gws_core

Import file to Table

Generic task that take a file as input and return a resource

Override the import_from_path method to import the file to the destination resource

Input

File

Output

Table
2d excel like table

Configuration

file_format

Optional

File format

Type : stringDefault value : auto

delimiter

Optional

Delimiter character. Only for parsing CSV files

Type : stringDefault value : auto

header

Optional

Row to use as the column names. By default the first row is used (i.e. header=0). Set header=-1 to not read column names.

Type : int

format_header_names

Optional

If true, the column and row names are formatted to remove special characters and spaces (only '_' are allowed).

Type : bool

index_column

Optional Advanced parameter

Column to use as the row names. By default no index is used (i.e. index_column=-1).

Type : intDefault value : -1

decimal

Optional Advanced parameter

Character to recognize as decimal point (e.g. use ‘,’ for European/French data).

Type : stringDefault value : .

nrows

Optional Advanced parameter

Number of rows to import. Useful to read piece of data.

Type : int

comment

Optional Advanced parameter

Character used to comment lines. Set empty to disable comment lines.

Type : stringDefault value : #

encoding

Optional Advanced parameter

Encoding of the file, 'auto' for automatic detection.

Type : stringDefault value : auto

metadata_columns

Optional Advanced parameter

Columns data to use to tag the rows of the table

Type : ListMaximum occurrences number : -1

column

Optional Advanced parameter

Metadata column to use to tag rows

Type : string

keep_in_table

Optional Advanced parameter

Set True to keep the column in the final table; False otherwise

Type : boolDefault value : true