SQL Query

Reference documentation

class dataikuapi.dss.sqlquery.DSSSQLQuery(client, query, connection, database, dataset_full_name, pre_queries, post_queries, type, extra_conf, script_steps, script_input_schema, script_output_schema, script_report_location, read_timestamp_without_timezone_as_string, read_date_as_string, project_key)

A connection to a database or database-like on which queries can be run through DSS. Do not create this class directly, instead use dataikuapi.DSSClient.sql_query()


Get the query’s result set’s schema


the schema as a JSON array of columns


Get the query’s results


an iterator over the rows, each row being a tuple of values. The order of values in the tuples is the same as the order of columns in the schema returned by get_schema


Verify that the result set streaming completed successfully and was not truncated


if the query failed at some point while streaming the results, an exception will be raised. If the call completes without exception, then the query was successfully streamed