evadb.EvaDBCursor.table#
- EvaDBCursor.table(table_name: str, chunk_size: Optional[int] = None, chunk_overlap: Optional[int] = None) EvaDBQuery [source]#
Retrieves data from a table in the database.
- Parameters:
table_name (str) – The name of the table to retrieve data from.
chunk_size (int, optional) – The size of the chunk to break the document into. Only valid for DOCUMENT tables. If not provided, the default value is 4000.
chunk_overlap (int, optional) – The overlap between consecutive chunks. Only valid for DOCUMENT tables. If not provided, the default value is 200.
- Returns:
An EvaDBQuery object representing the table query.
- Return type:
EvaDBQuery
Examples
>>> relation = cursor.table("sample_table") >>> relation = cursor.select('*') >>> relation.df() col1 col2 0 1 2 1 3 4 2 5 6
Read a document table using chunk_size 100 and chunk_overlap 10.
>>> relation = cursor.table("doc_table", chunk_size=100, chunk_overlap=10)