# US 2021/0240557 A1 · Invoking external table functions from a data system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0240557 A1
- Document ID: US20210240557A1
- Status: Published application
- Kind: A1
- Application number: 17/238,558
- Filed: 2021-04-23
- Published: 2021-08-05
- Earliest claimed: 2019-10-29
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Istvan Cseri; Isaac Kunen; Igor Zinkovsky
- Web page: https://patentgrep.com/patent/US20210240557A1

## CPC

- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- G06F 9/548: {Object oriented; Remote method invocation [RMI] (non-remote method invocation G06F9/449)}
- G06F 16/2448: {for particular applications; for extensibility, e.g. user defined types}
- G06F 16/86: {Mapping to a database}
- G06F 16/972: {Access to data in other repository systems, e.g. legacy data or dynamic Web page generation}
- H04L 63/0414: {during transmission, i.e. party's identity is protected against eavesdropping, e.g. by using temporary identifiers, but is known to the other party or parties involved in the communication}
- H04L 63/108: {when the policy decisions are valid for a limited amount of time}
- H04L 67/565: Conversion or adaptation of application format or content (adding application control or application functional data H04L67/561)
- G06F 2209/549: Remote execution
- H04L 63/068: {using time-dependent keys, e.g. periodically changing keys (cryptographic mechanisms or cryptographic arrangements for controlling usage of secret information H04L9/088)}
- H04L 63/0846: {using time-dependent-passwords, e.g. periodically changing passwords}
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A query referencing a function associated with a remote software component is received by a network-based data warehouse system. Temporary security credentials corresponding to a role at a cloud computing service platform are obtained. The role has permission to send calls to a web endpoint corresponding to the remote software component. A request comprising input data and electronically signed using the temporary security credentials is sent to a web Application Programming Interface (API) management system of the cloud computing service platform. The request, when received by the web API management system, causes the web API management system to invoke external functionality provided by the remote software component at the web endpoint with respect to the input data. A response comprising a result of invoking the external functionality is received from the web API management system, and the result data is processed according to the query.

## Claims

### Claim 1

A system comprising:
one or more hardware processors; and
one or more memories storing instructions that cause the one or more hardware processors to perform operations comprising:
receiving, from a computing device, a query referencing a table function provided by a remote software component;
invoking the table function provided by the remote software component by sending one or more requests to the remote software component via a web application programming interface (API) management system;
polling the web API management system for a status of the one or more requests;
sending one or more additional request to the web API management system based on the status of the one or more requests;
receiving, from the web API management system, one or more responses comprising result data corresponding to a result of the remote software component executing the table function; and
processing the result data according to the query.

### Claim 2 (depends on 1)

The system of claim 1, wherein the polling of the web API management system comprising sending at least one additional request to the web API management system.

### Claim 3 (depends on 1)

The system of claim 1, wherein each of the one or more requests include a batch of input rows on which the table function is to be invoked.

### Claim 4 (depends on 3)

The system of claim 3, wherein a size of each batch of input rows is based on one of: a user-specified maximum batch size, a maximum payload size allowed by the API management system, or a maximum batch size allowed by the system.

### Claim 5 (depends on 1)

The system of claim 1, wherein:
each of the one or more requests correspond to a hypertext transfer protocol (HTTP) request;
the one or more responses correspond to an HTTP response; and
the result data comprises JSON encoded data, Apache Arrow encoded data, or XML, encoded data.

### Claim 6 (depends on 1)

The system of claim 1, wherein at least one of the one or more requests are electronically signed using temporary security credentials corresponding to a role at the web API management system, the role having associated privileges to send calls to an endpoint corresponding to the remote software component.

### Claim 7 (depends on 6)

The system of claim 6, wherein the operations further comprise:
in response to the query, accessing, from a database of the system, a function object associated with the remote software component, the function object identifying the endpoint corresponding to the remote software component and an integration object associated with the remote software component; and
accessing, from the database, the integration object identifying the role at the web API management system.

### Claim 8 (depends on 7)

The system of claim 7, wherein the operations further comprise:
detecting an expiration of the temporary security credentials based on the polling; and
in response to detecting the expiration of the temporary security credentials, sending an additional request to the web API management system to refresh the temporary security credentials.

### Claim 9 (depends on 8)

The system of claim 8, wherein detecting the expiration of the temporary security credentials comprises receiving a timeout message from the web API management system.

### Claim 10 (depends on 1)

The system of claim 1, wherein the operations further comprise extracting the result data from the one or more responses.

### Claim 11

A method comprising:
receiving, from a computing device, a query referencing a table function provided by a remote software component;
invoking the table function provided by the remote software component by sending one or more requests to the remote software component via a web application programming interface (API) management system;
polling the web API management system for a status of the one or more requests;
sending one or more additional request to the web API management system based on the status of the one or more requests;
receiving, from the web API management system, one or more responses comprising result data corresponding to a result of the remote software component executing the table function; and
processing the result data according to the query.

### Claim 12 (depends on 11)

The method of claim 11, wherein the polling of the web API management system comprising sending at least one additional request to the web API management system.

### Claim 13 (depends on 11)

The method of claim 11, wherein each of the one or more requests include a batch of input rows on which the table function is to be invoked.

### Claim 14 (depends on 13)

The method of claim 13, wherein a size of each batch of input rows is based on one of: a user-specified maximum batch size, a maximum payload size allowed by the API management system, or a maximum batch size allowed by the system.

### Claim 15 (depends on 11)

The method of claim 11, wherein:
each of the one or more requests correspond to a hypertext transfer protocol (HTTP) request;
the one or more responses correspond to an HTTP response; and
the result data comprises JSON encoded data, Apache Arrow encoded data, or XML, encoded data.

### Claim 16 (depends on 11)

The method of claim 11, wherein at least one of the one or more requests are electronically signed using temporary security credentials corresponding to a role at the web API management system, the role having associated privileges to send calls to an endpoint corresponding to the remote software component.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
in response to the query, accessing, from a database of the system, a function object associated with the remote software component, the function object identifying the endpoint corresponding to the remote software component and an integration object associated with the remote software component; and
accessing, from the database, the integration object identifying the role at the web API management system.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
receiving a timeout message from the web API management system in response to the polling; and
in response receiving the timeout message, sending an additional request to the web API management system to refresh the temporary security credentials.

### Claim 19

A computer-storage medium comprising instructions that, when executed by a processing device, configure the processing device to perform operations comprising:
receiving, from a computing device, a query referencing a table function provided by a remote software component;
invoking the table function provided by the remote software component by sending one or more requests to the remote software component via a web application programming interface (API) management system;
polling the web API management system for a status of the one or more requests;
sending one or more additional request to the web API management system based on the status of the one or more requests;
receiving, from the web API management system, one or more responses comprising result data corresponding to a result of the remote software component executing the table function; and
processing the result data according to the query.

### Claim 20 (depends on 19)

The computer-storage medium of claim 19, wherein:
at least one of the one or more requests are electronically signed using temporary security credentials corresponding to a role at the web API management system having associated privileges to send calls to an endpoint corresponding to the remote software component; and
the operations further comprise:
in response to the query, accessing, from a database of the system, a function object associated with the remote software component, the function object identifying the endpoint corresponding to the remote software component and an integration object associated with the remote software component;
accessing, from the database, the integration object identifying the role at the web API management system; and
obtaining, cloud computing service platform, temporary security credentials corresponding to the role.
