Basic API#
To begin your querying session, get a connection to the EvaDB using connect
:
|
Connects to the EvaDB server and returns a connection object. |
from evadb import connect
conn = connect()
You can then use this connection to run queries:
conn.load("online_video.mp4", "youtube_video", "video").df()
conn.query("CREATE TABLE IF NOT EXISTS youtube_video_text AS SELECT SpeechRecognizer(audio) FROM youtube_video;").df()
Warning
It is important to call df
to run the actual query.
EvaDB uses a lazy query execution technique to improve performance.
Calling conn.query("...")
will only construct and not run the query. Calling conn.query("...").df()
will both construct and run the query.
EvaDBConnection Interface#
|
Retrieves a cursor associated with the connection. |
EvaDBCursor Interface#
|
Connects to the EvaDB server and returns a connection object. |
|
Loads data from files into a table. |
|
Executes a SQL query. |
|
Retrieves data from a table in the database. |
|
Create a udf in the database. |
|
Creates a vector index using the provided expr on the table. |
|
Returns the result as a pandas DataFrame. |
|
Drop a table in the database. |
|
Drop a udf in the database. |
|
Drop an index in the database. |
EvaDBQuery Interface#
|
Projects a set of expressions and returns a new EvaDBQuery. |
|
Execute a expr on all the rows of the relation |
|
Filters rows using the given condition. |
|
Execute and fetch all rows as a pandas DataFrame |
|
Returns a new Relation with an alias set. |
|
Limits the result count to the number specified. |
|
Reorder the relation based on the order_expr |
|
Execute and fetch all rows as a pandas DataFrame |
Get the SQL query that is equivalent to the relation |
|
|
Transform the relation into a result set |