Skip to content

operations

assemble.tables

Documentation

Assemble a 'tables' value from multiple tables.

Depending on the module configuration, 2 or more tables can be merged into a single 'tables' value.

Inputs
field name type description required default
table_name_1 string The alias for table #1. yes
table_1 table The table to merge (#1). yes
table_name_2 string The alias for table #2. yes
table_2 table The table to merge (#2). yes
Outputs
field name type description required default
tables tables The assembled tables instance. yes

create.database.from.file

Documentation

Create a database from a file.

Currently, only csv files are supported.

Inputs
field name type description required default
file file The source value (of type 'file'). yes
first_row_is_header boolean Whether the first row of the file is a header row. If not provided, kiara will try to auto-determine. no
Outputs
field name type description required default
database database The result value (of type 'database'). yes

create.database.from.file_bundle

Documentation

Create a database from a file_bundle value.

Currently, only csv files are supported, files in the source file_bundle that have different extensions will be ignored.

Unless 'merge_into_single_table' is set to 'True' in the module configuration, each csv file will create one table in the resulting database. If this option is set, only a single table with all the values of all csv files will be created. For this to work, all csv files should follow the same schema.

Inputs
field name type description required default
file_bundle file_bundle The source value (of type 'file_bundle'). yes
Outputs
field name type description required default
database database The result value (of type 'database'). yes

create.database.from.table

Documentation

Create a database value from a table.

Inputs
field name type description required default
table table The source value (of type 'table'). yes
table_name string The name of the table in the new database. no imported_table
Outputs
field name type description required default
database database The result value (of type 'database'). yes

create.database.from.tables

Documentation

Create a database value from a list of tables.

Inputs
field name type description required default
tables tables The source value (of type 'tables'). yes
Outputs
field name type description required default
database database The result value (of type 'database'). yes

create.table.from.file

Documentation

Create a table from a file, trying to auto-determine the format of said file.

Inputs
field name type description required default
file file The source value (of type 'file'). yes
first_row_is_header boolean Whether the first row of the file is a header row. If not provided, kiara will try to auto-determine. no
Outputs
field name type description required default
table table The result value (of type 'table'). yes

create.table.from.file_bundle

Documentation

Create a table value from a text file_bundle.

The resulting table will have (at a minimum) the following columns:

  • id: an auto-assigned index
  • rel_path: the relative path of the file (from the provided base path)
  • content: the text file content
Inputs
field name type description required default
file_bundle file_bundle The source value (of type 'file_bundle'). yes
Outputs
field name type description required default
table table The result value (of type 'table'). yes

create.tables.from.file_bundle

Documentation

Create a database from a file_bundle value.

Currently, only csv files are supported, files in the source file_bundle that have different extensions will be ignored.

Unless 'merge_into_single_table' is set to 'True' in the module configuration, each csv file will create one table in the resulting database. If this option is set, only a single table with all the values of all csv files will be created. For this to work, all csv files should follow the same schema.

Inputs
field name type description required default
file_bundle file_bundle The source value (of type 'file_bundle'). yes
Outputs
field name type description required default
tables tables The result value (of type 'tables'). yes

deserialize.array.as.python_object

Documentation

-- n/a --

Inputs
field name type description required default
array array The value object. yes
deserialization_config any Serialization-format specific configuration. no
Outputs
field name type description required default
python_object python_object The deserialized python object instance. yes

deserialize.database.as.python_object

Documentation

-- n/a --

Inputs
field name type description required default
database database The value object. yes
deserialization_config any Serialization-format specific configuration. no
Outputs
field name type description required default
python_object python_object The deserialized python object instance. yes

deserialize.table.as.python_object

Documentation

-- n/a --

Inputs
field name type description required default
table table The value object. yes
deserialization_config any Serialization-format specific configuration. no
Outputs
field name type description required default
python_object python_object The deserialized python object instance. yes

deserialize.tables.as.python_object

Documentation

-- n/a --

Inputs
field name type description required default
tables tables The value object. yes
deserialization_config any Serialization-format specific configuration. no
Outputs
field name type description required default
python_object python_object The deserialized python object instance. yes

export.database.as.csv_files

Documentation

Export network data as 2 csv files (one for edges, one for nodes.

Inputs
field name type description required default
database database A value of type 'database'. yes
base_path string The directory to export the file(s) to. no
name string The (base) name of the exported file(s). no
export_metadata boolean Whether to also export the value metadata. no False
Outputs
field name type description required default
export_details dict Details about the exported files/folders. yes

export.database.as.sql_dump

Documentation

Export network data as a sql dump file.

Inputs
field name type description required default
database database A value of type 'database'. yes
base_path string The directory to export the file(s) to. no
name string The (base) name of the exported file(s). no
export_metadata boolean Whether to also export the value metadata. no False
Outputs
field name type description required default
export_details dict Details about the exported files/folders. yes

export.database.as.sqlite_db

Documentation

Export network data as a sqlite database file.

Inputs
field name type description required default
database database A value of type 'database'. yes
base_path string The directory to export the file(s) to. no
name string The (base) name of the exported file(s). no
export_metadata boolean Whether to also export the value metadata. no False
Outputs
field name type description required default
export_details dict Details about the exported files/folders. yes

export.table.as.csv_file

Documentation

Export a table as csv file.

Inputs
field name type description required default
table table A value of type 'table'. yes
base_path string The directory to export the file(s) to. no
name string The (base) name of the exported file(s). no
export_metadata boolean Whether to also export the value metadata. no False
Outputs
field name type description required default
export_details dict Details about the exported files/folders. yes

export.tables.as.csv_files

Documentation

Export network data as 2 csv files (one for edges, one for nodes.

Inputs
field name type description required default
tables tables A value of type 'tables'. yes
base_path string The directory to export the file(s) to. no
name string The (base) name of the exported file(s). no
export_metadata boolean Whether to also export the value metadata. no False
Outputs
field name type description required default
export_details dict Details about the exported files/folders. yes

export.tables.as.sql_dump

Documentation

Export network data as a sql dump file.

Inputs
field name type description required default
tables tables A value of type 'tables'. yes
base_path string The directory to export the file(s) to. no
name string The (base) name of the exported file(s). no
export_metadata boolean Whether to also export the value metadata. no False
Outputs
field name type description required default
export_details dict Details about the exported files/folders. yes

export.tables.as.sqlite_db

Documentation

Export network data as a sqlite database file.

Inputs
field name type description required default
tables tables A value of type 'tables'. yes
base_path string The directory to export the file(s) to. no
name string The (base) name of the exported file(s). no
export_metadata boolean Whether to also export the value metadata. no False
Outputs
field name type description required default
export_details dict Details about the exported files/folders. yes

extract.date_array.from.table

Documentation

Extract a date array from a table column.

Inputs
field name type description required default
table table A table. yes
column_name string The name of the column to extract. yes
parse_date_array__force_non_null boolean If set to 'True', raise an error if any of the strings in the array can't be parsed. no True
parse_date_array__min_index integer The minimum index from where to start parsing the string(s). no
parse_date_array__max_index integer The maximum index until whic to parse the string(s). no
parse_date_array__remove_tokens list A list of tokens/characters to replace with a single white-space before parsing the input. no []
Outputs
field name type description required default
date_array array The resulting array with items of a date data type. yes

import.database.from.local_file_path

Documentation

Import a database from a csv file.

Inputs
field name type description required default
path string The local path to the file. yes
create_database_from_file__first_row_is_header boolean Whether the first row of the file is a header row. If not provided, kiara will try to auto-determine. no
Outputs
field name type description required default
imported_file file The loaded files. yes
database database The result value (of type 'database'). yes

import.table.from.local_file_path

Documentation

Import a table from a file on the local filesystem.

Inputs
field name type description required default
path string The local path to the file. yes
first_row_is_header boolean Whether the first row of the file is a header row. If not provided, kiara will try to auto-determine. no
Outputs
field name type description required default
imported_file file The loaded files. yes
table table The result value (of type 'table'). yes

import.table.from.local_folder_path

Documentation

Import a table from a local folder containing text files.

Inputs
field name type description required default
path string The local path of the folder to import. yes
Outputs
field name type description required default
imported_file_bundle file_bundle The imported file bundle. yes
table table The result value (of type 'table'). yes

parse.date_array

Documentation

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.

Inputs
field name type description required default
array array The input array. yes
force_non_null boolean If set to 'True', raise an error if any of the strings in the array can't be parsed. no True
min_index integer The minimum index from where to start parsing the string(s). no
max_index integer The maximum index until whic to parse the string(s). no
remove_tokens list A list of tokens/characters to replace with a single white-space before parsing the input. no []
Outputs
field name type description required default
date_array array The resulting array with items of a date data type. yes

query.database

Documentation

Execute a sql query against a (sqlite) database.

Inputs
field name type description required default
database database The database to query. yes
query string The query to execute. yes
Outputs
field name type description required default
query_result table The query result. yes

query.table

Documentation

Execute a sql query against an (Arrow) table.

The default relation name for the sql query is 'data', but can be modified by the 'relation_name' config option/input.

If the 'query' module config option is not set, users can provide their own query, otherwise the pre-set one will be used.

Inputs
field name type description required default
table table The table to query yes
query string The query, use the value of the 'relation_name' input as table, e.g. 'select * from data'. yes
relation_name string The name the table is referred to in the sql query. no data
Outputs
field name type description required default
query_result table The query result. yes

render.database.as.string

Documentation

-- n/a --

Inputs
field name type description required default
value database A value of type 'database' yes
render_config dict Instructions/config on how (or what) to render the provided value. no {}
Outputs
field name type description required default
render_value_result render_value_result The rendered value, incl. some metadata. yes

render.database.as.terminal_renderable

Documentation

-- n/a --

Inputs
field name type description required default
value database A value of type 'database' yes
render_config dict Instructions/config on how (or what) to render the provided value. no {}
Outputs
field name type description required default
render_value_result render_value_result The rendered value, incl. some metadata. yes

render.table.as.string

Documentation

-- n/a --

Inputs
field name type description required default
value table A value of type 'table' yes
render_config dict Instructions/config on how (or what) to render the provided value. no {}
Outputs
field name type description required default
render_value_result render_value_result The rendered value, incl. some metadata. yes

render.table.as.terminal_renderable

Documentation

-- n/a --

Inputs
field name type description required default
value table A value of type 'table' yes
render_config dict Instructions/config on how (or what) to render the provided value. no {}
Outputs
field name type description required default
render_value_result render_value_result The rendered value, incl. some metadata. yes

table.pick.column

Documentation

Pick one column from a table, returning an array.

Inputs
field name type description required default
table table A table. yes
column_name string The name of the column to extract. yes
Outputs
field name type description required default
array array The column. yes

table_filter.drop_columns

Documentation

-- n/a --

Inputs
field name type description required default
value table A value of type 'table'. yes
columns list The name of the columns to include. no
ignore_invalid_column_names boolean Whether to ignore invalid column names. no True
Outputs
field name type description required default
value table The filtered value. yes

table_filter.select_columns

Documentation

-- n/a --

Inputs
field name type description required default
value table A value of type 'table'. yes
columns list The name of the columns to include. no
ignore_invalid_column_names boolean Whether to ignore invalid column names. no True
Outputs
field name type description required default
value table The filtered value. yes

table_filter.select_rows

Documentation

-- n/a --

Inputs
field name type description required default
value table A value of type 'table'. yes
match string The string token to match. no
case_insensitive boolean Whether to ignore case. no True
Outputs
field name type description required default
value table The filtered value. yes