dlt.destinations.dataset.relation
BaseReadableDBAPIRelation Objects
class BaseReadableDBAPIRelation(SupportsReadableRelation, WithSqlClient)
__init__
def __init__(*, readable_dataset: "ReadableDBAPIDataset") -> None
Create a lazy evaluated relation to for the dataset of a destination
cursor
@contextmanager
def cursor() -> Generator[SupportsReadableRelation, Any, Any]
Gets a DBApiCursor for the current relation
compute_columns_schema
def compute_columns_schema(infer_sqlglot_schema: bool = True,
allow_anonymous_columns: bool = True,
allow_partial: bool = True,
**kwargs: Any) -> TTableSchemaColumns
Provides the expected columns schema for the query
Arguments:
infer_sqlglot_schema
bool - If False, raise if any column types are not knownallow_anonymous_columns
bool - If False, raise if any columns have auto assigned namesallow_partial
bool - If False, will raise if for some reason no columns can be computed
ReadableDBAPIRelation Objects
class ReadableDBAPIRelation(BaseReadableDBAPIRelation)
__init__
def __init__(*,
readable_dataset: "ReadableDBAPIDataset",
provided_query: Any = None,
table_name: str = None,
limit: int = None,
selected_columns: Sequence[str] = None) -> None
Create a lazy evaluated relation to for the dataset of a destination