aleph.datasets.query

CSVQuery

class aleph.datasets.query.CSVQuery

Imports

  • aleph.datasets.query.Query

Summary

Special case for entity loading directly from a CSV URL

__init__(self, dataset, data)
__repr__(self)
check_filters(self, data)
iterrows(self)

Iterate through the table applying filters on-the-go.

read_csv(self, csv_url)

DBQuery

class aleph.datasets.query.DBQuery

Imports

  • aleph.datasets.query.Query
__init__(self, dataset, data)
apply_filters(self, q)
compose_query(self)
engine(self)
from_clause(self)
get_column(self, ref)
get_table(self, ref)
iterrows(self)

Compose the actual query and return an iterator of Record.

mapped_columns(self)

Determine which columns must be selected.

This will check entity and link mappings for the set of columns actually used in order to avoid loading superfluous data.

meta(self)

Query

class aleph.datasets.query.Query

Imports

  • object

Summary

A dataset describes one set of data to be loaded.

__init__(self, dataset, data)
__repr__(self)
active_refs(self)

QueryTable

class aleph.datasets.query.QueryTable

Imports

  • object

Summary

A table to be joined in.

__init__(self, query, data)
__repr__(self)