datareactor.atoms.rowcount module¶
Classes
Count the number of child rows. |
-
class
datareactor.atoms.rowcount.
RowCountAtom
[source]¶ Bases:
datareactor.atoms.base.Atom
Count the number of child rows.
The RowCountAtom generates derived columns which specify the number of rows in each of the child columns.
TODO: This causes a segmentation fault on Seznam /AdventureWorks2014.
Methods
derive
(dataset, table_name)Count the number of rows in each child table.
-
derive
(dataset, table_name)[source]¶ Count the number of rows in each child table.
This function generates a derived column for each child table which contains the number of rows in each group.
For example, if the target table is users, then it might generate a derived column containing the number of rows in the transaction table that belongs to each user.
- Parameters
dataset (Dataset) – The dataset.
table_name (str) – The name of the target table.
- Returns
The derived columns.
- Return type
(
list
ofDerivedColumn
)
-