Skip to content

[BUG]: PhysicalTable has no columns attributeΒ #218

@gomesfernandes

Description

@gomesfernandes

Description

In the PhysicalTable's class docstring, columns is listed as an attribute, but this property is not loaded when listing physical tables or initializing a PhysicalTable using its ID.

As a result, accessing the columns attribute results in the following error: AttributeError: 'PhysicalTable' object has no attribute 'columns'

Steps To Reproduce

List physical tables with the list_physical_tables function, or load a PhysicalTable directly with its ID.

Code Snippet

Requires a valid Connection object

from mstrio.modeling.schema.table import list_physical_tables, PhysicalTable

# using the listing function
physical_tables = list_physical_tables(connection)
physical_tables[0].columns


# using a valid ID
PhysicalTable(id=PHYSICAL_TABLE_ID, connection=connection).columns

Additional Context

The columns of a physical table are correctly retrieved when listing them indirectly via the logical tables.

from mstrio.modeling.schema.table import LogicalTable
LogicalTable(id=LOGICAL_TABLE_ID, connection=connection).physical_table.columns

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnewThe item has just been created and was not seen by MSTR developer yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions