cubes_lite/sql/mapping.py
def _collect_tables(self):
        """"
        Collect all the detail tables
        We don't need to collect the master tables as they are expected to
        be referenced as 'details'. The exception is the fact table that is
        provided explicitly for the snowflake schema.
        """

        table_objects = [self.root_table_object]

        for join in self.joins:
            table_name = join.detail.table

            if not table_name:
                raise ModelError(
                    'No detail table specified for a join "{}"'.format(join)
                )

            detail_table = self.construct_physical_table(
                name=table_name,
                schema=join.detail.schema,
            )

            if join.alias:
                detail_table = detail_table.alias(join.alias)

            obj = TableObject(
                table=detail_table,
                schema=join.detail.schema,
                name=table_name,
                alias=join.alias,
                join=join,
            )

            table_objects.append(obj)

        table_objects = object_dict(
            table_objects,
            key_func=lambda obj: (obj.schema, obj.alias or obj.name),
            error_message=(
                'Detail table "{key[1]}" joined twice in cube "{cube}".'
                'Unique join alias is required.'
            ),
            error_dict={'cube': self.cube.name},
        )

        # alias for fact table
        table_objects[(None, None)] = self.root_table_object

        return table_objects

        Collect all the detail tables
        We don't need to collect the master tables as they are expected to
        be referenced as 'details'. The exception is the fact table that is
        provided explicitly for the snowflake schema.
        
Collect all the detail tables
We don't need to collect the master tables as they are expected to
be referenced as 'details'. The exception is the fact table that is
provided explicitly for the snowflake schema.
Collect all the detail tables We don ' t need to collect the master tables as they are expected to be referenced as ' details ' . The exception is the fact table that is provided explicitly for the snowflake schema .
def _collect_tables(self):
        table_objects = [self.root_table_object]
        for join in self.joins:
            table_name = join.detail.table
            if not table_name:
                raise ModelError(
                    'No detail table specified for a join "{}"'.format(join)
                )
            detail_table = self.construct_physical_table(
                name=table_name,
                schema=join.detail.schema,
            )
            if join.alias:
                detail_table = detail_table.alias(join.alias)
            obj = TableObject(
                table=detail_table,
                schema=join.detail.schema,
                name=table_name,
                alias=join.alias,
                join=join,
            )
            table_objects.append(obj)
        table_objects = object_dict(
            table_objects,
            key_func=lambda obj: (obj.schema, obj.alias or obj.name),
            error_message=(
                'Detail table "{key[1]}" joined twice in cube "{cube}".'
                'Unique join alias is required.'
            ),
            error_dict={'cube': self.cube.name},
        )
        table_objects[(None, None)] = self.root_table_object
        return table_objects
def _collect_tables ( self ) : table_objects = [ self . root_table_object ] for join in self . joins : table_name = join . detail . table if not table_name : raise ModelError ( 'No detail table specified for a join "{}"' . format ( join ) ) detail_table = self . construct_physical_table ( name = table_name , schema = join . detail . schema , ) if join . alias : detail_table = detail_table . alias ( join . alias ) obj = TableObject ( table = detail_table , schema = join . detail . schema , name = table_name , alias = join . alias , join = join , ) table_objects . append ( obj ) table_objects = object_dict ( table_objects , key_func = lambda obj : ( obj . schema , obj . alias or obj . name ) , error_message = ( 'Detail table "{key[1]}" joined twice in cube "{cube}".' 'Unique join alias is required.' ) , error_dict = { 'cube' : self . cube . name } , ) table_objects [ ( None , None ) ] = self . root_table_object return table_objects
Collect all the detail tables
We don't need to collect the master tables as they are expected to
be referenced as 'details'.
Collect all the detail tables We don ' t need to collect the master tables as they are expected to be referenced as ' details ' .
""""
        Collect all the detail tables
        We don't need to collect the master tables as they are expected to
        be referenced as 'details'. The exception is the fact table that is
        provided explicitly for the snowflake schema.
        """ # alias for fact table
self