kumoai.connector.FileUploadConnector#
- class kumoai.connector.FileUploadConnector[source]#
Bases:
Connector
Defines a connector to files directly uploaded to Kumo, either as ‘parquet’ or ‘csv’ (non-partitioned) data.
To get started with file upload, please first upload a table with the
upload_table()
method. You can then access this table behind the file upload connector as follows:import kumoai from kumoai.connector import upload_table # Upload the table; assume it is stored at `/data/users.parquet` upload_table(name="users", path="/data/users.parquet") # Create the file upload connector: connector = kumoai.FileUploadConnector(file_type="parquet") # Check that the file upload connector has a `users` table: assert connector.has_table("users")
- Parameters:
file_type (
str
) – The file type of uploaded data. Can be either"csv"
or"parquet"
.
- property name: str#
Returns the name of the connector.
Note
If the connector does not support naming, the name refers to an internal specifier.
- property source_type: DataSourceType#
Returns the data source type accessible by this connector.
- table(name)#
Returns a
SourceTable
object corresponding to a source table behind this connector. A source table is a view into the raw data of tablename
. To use a source table in Kumo, you will need to construct aTable
from the source table.- Parameters:
name (
str
) – The table name.- Raises:
ValueError – if
name
does not exist in the backing connector.- Return type: