One or more non-transitory computer-accessible storage media storing program instructions that when executed on one or more processors implement:
- a structured query language (SQL) query engine configured to:
- use different types of connectors to perform received SQL queries on a non-SQL document store, including:
- a first connector that treats data within an individual document in the non-SQL document store as multiple table rows, and
- a second connector that treats individual documents in the non-SQL document store as individual table rows;
- dynamically load the first connector into memory to establish a first connection to the non-SQL document store in response to a first connection request, wherein the first connector is selected based on a connection parameter of the first connection request;
- receive a first SQL query to access the non-SQL document store over the first connection and parse the first SQL query;
- instruct the first connector to fetch data from a first document in the non-SQL document store according to the first SQL query, including multiple objects stored in the first document;
- format the data fetched from the first document and return the data as response to the first SQL query;
- dynamically load the second connector into memory to establish a second connection to the non-SQL document store in response to a second connection request, wherein the second connector is selected based on a connection parameter of the second connection request;
- receive a second SQL query to access the non-SQL document store over the second connection and parse the second SQL query;
- instruct the second connector to fetch data from a second document in the non-SQL document store according to the second SQL query, including an object stored in the second document;
- and
- format the data fetched from the second document and return the data as response to the second SQL query;
- the first connector, configured to:
- issue one or more calls over the first connection to a data access interface of the non-SQL document store to fetch the data from the first document in the non-SQL document store according to the first SQL query, wherein the one or more calls causes the non-SQL document store to:
- open the first document, wherein the first document is associated with a table specified by the first SQL query and stores the multiple objects as an array in a compressed form;
- read the multiple objects from the first document and decompress the multiple objects;
- and
- return the multiple objects to the SQL query engine over the first connection according to the one or more calls;
- and
- the second connector, configured to:
- issue one or more calls over the second connection to the data access interface of the non-SQL document store to fetch the data from the second document in the non-SQL document store according to the second SQL query, wherein the one or more calls causes the non-SQL document store to:
- open the second document, wherein the second document stores the object and represents a row in another table specified by the second SQL query;
- and
- return the object to the SQL query engine over the second connection according to the one or more calls.