Skip to main content
query(sql, batch_size=5000, sql_params=[], sql_opts=)[source]

Execute a SQL query and return a GPUdbSqlIterator

Parameters

sql (str) –

The SQL query to run

batch_size (int) –

The number of records to retrieve at a time from the database

sql_params (list of native types) –

The SQL parameters that will be substituted for tokens (e.g. 11 2)

sql_opts (dict) –

The options for SQL execution, matching the options passed to GPUdb.execute_sql(). Defaults to None.

Returns

An instance of GPUdbSqlIterator.