Patent ID: 8438141

Claim:
A computer implemented method performed by one or more computer processors, the method comprising: providing a calling application that submits a first query which is created by a user; receiving the first query, which references a first user-defined table function (UDTF); responsive to the received first query, calling the referenced first UDTF; calling a second user-defined table function referenced by the called first UDTF; and calling a metadata processor referenced by the called second UDTF for performing operations related to providing data to the second UDTF, wherein the operations comprise: submitting a second query to gather attributes comprising security attributes of the user and attributes of the second UDTF; receiving query results which correspond to the second query; using the query results which correspond to the second query, forming a third query based on the attributes comprising security attributes of the user and attributes of the second UDTF and by operation of the one or more computer processors; submitting the third query against the table; and providing query results which correspond to the third query to the second UDTF, wherein the second UDTF is configured to add column headings to the query results, and wherein the first UDTF is configured to eliminate unused columns and convert the query results to a proper data type.