API Reference

intake_odbc.intake_odbc.ODBCSource(uri, sql_expr) One-shot ODBC to dataframe reader
intake_odbc.intake_odbc.ODBCPartitionedSource(…) ODBC partitioned reader
class intake_odbc.intake_odbc.ODBCSource(uri, sql_expr, metadata=None, **odbc_kwargs)[source]

One-shot ODBC to dataframe reader

Parameters:
uri: str or None

Full connection string for TurbODBC. If using keyword parameters, this should be None

sql_expr: str

Query expression to pass to the DB backend

Further connection arguments, such as username/password, and may also
include the following:
head_rows: int (10)

Number of rows that are read from the start of the data to infer data types upon discovery

mssql: bool (False)

Whether to use MS SQL Server syntax - depends on the backend target of the connection

Attributes:
cache_dirs
datashape
description
hvplot

Returns a hvPlot object to provide a high-level plotting API.

plot

Returns a hvPlot object to provide a high-level plotting API.

plots

List custom associated quick-plots

Methods

close() Close open resources corresponding to this data source.
discover() Open resource and populate the source attributes.
read() Load entire dataset into a container and return it
read_chunked() Return iterator over container fragments of data source
read_partition(i) Return a (offset_tuple, container) corresponding to i-th partition.
to_dask() Return a dask container for this data source
to_spark() Provide an equivalent data object in Apache Spark
yaml([with_plugin]) Return YAML representation of this data-source
set_cache_dir  
class intake_odbc.intake_odbc.ODBCPartitionedSource(uri, sql_expr, metadata=None, **odbc_kwargs)[source]

ODBC partitioned reader

This source produces new queries for each partition, where an index column is used to select rows belonging to each partition

Parameters:
uri: str or None

Full connection string for TurbODBC. If using keyword parameters, this should be None

sql_expr: str

Query expression to pass to the DB backend

Further connection arguments, such as username/password, and may also
include the following:
head_rows: int (10)

Number of rows that are read from the start of the data to infer data types upon discovery

mssql: bool (False)

Whether to use MS SQL Server syntax - depends on the backend target of the connection

index: str

Column to use for partitioning

max, min: str

Range of values in index to consider (will query DB if not given)

npartitions: int

Number of partitions to assume

divisions: list of values

If given, use these as partition boundaries - and therefore ignore max/min and npartitions

Attributes:
cache_dirs
datashape
description
hvplot

Returns a hvPlot object to provide a high-level plotting API.

plot

Returns a hvPlot object to provide a high-level plotting API.

plots

List custom associated quick-plots

Methods

close() Close open resources corresponding to this data source.
discover() Open resource and populate the source attributes.
read() Load entire dataset into a container and return it
read_chunked() Return iterator over container fragments of data source
read_partition(i) Return a (offset_tuple, container) corresponding to i-th partition.
to_dask() Return a dask container for this data source
to_spark() Provide an equivalent data object in Apache Spark
yaml([with_plugin]) Return YAML representation of this data-source
set_cache_dir