tlc.core.objects.tables.from_url.table_from_row_cache¶
A table representing another, potentially unregistered, Table type from a URL
Module Contents¶
Classes¶
Class |
Description |
|---|---|
A table that wraps another table based on its row cache. |
API¶
- class TableFromRowCache( )¶
Bases:
tlc.core.objects.tables.from_url.table_from_parquet.TableFromParquetA table that wraps another table based on its row cache.
A
TableFromRowCacheenables a limited representation of unknown Table types that are not registered in the system. Note that the UnknownTable’s derived properties are not initialized and are only present as plain objects.The
TableFromRowCacheis not intended for direct instantiation, use theTableFromParquetwhenever explicit loading of tables from parquet files is desired. Instead, theTableFromRowCacheshould be used as a utility for loading and representing tables that are not registered in the system. It offers an abstracted interface to work with these unknown table types while maintaining system integrity.The implementation is a minimal wrapper around TableFromParquet.
This
TableFromRowCachecan be used to represent other Table types as long as the following requirements are met:The object must have a row_cache_url set
The object must have row_cache_populated set
The object must have a schema set
Limitations:
Initialization:
TableFromRowCachecan only be initialized using theinit_paramsas is done when calling Table.from_url or ObjectRegistry.get_or_create_object_from_url. Direct initialization is not supported. UseTableFromParquetinstead.Write Restriction: The table cannot be written to a URL since it would mean overwriting the original table and losing information therein. Again, use
TableFromParquetif a persistent table is desired.Plain attributes: Derived attributes are not initialized and are plain objects, for example:
input_urls are strings and not Url objects.
- Parameters:
init_parameters – The parameters to initialize the object with.
- Parameters:
url – The URL of the table.
created – The creation time of the table.
description – The description of the table.
row_cache_url – The URL of the row cache.
row_cache_populated – Whether the row cache is populated.
override_table_rows_schema – The schema to override the table rows schema.
init_parameters – The initial parameters of the table.
input_tables – A list of Table URLs that are considered direct predecessors in this table’s lineage. This parameter serves as an explicit mechanism for tracking table relationships beyond the automatic lineage tracing typically managed by subclasses.
- static can_create_from_content(
- parameters: Any,
Determines whether a
TableFromRowCachecan be created from the given parameters.This can be used to determine whether a serialized Table of another type can be represented as a
TableFromRowCache. The following is required:The table must have a row_cache_url set
The table must have a row_cache_populated set
The table must have a schema set
- Parameters:
parameters – The parameters to check.
- Returns:
The type of the object that can be created from the given parameters, or None if no object can be created.