Cloud Functions
On this page
Note
This is a Preview feature.
SingleStore Cloud Functions is a serverless, cloud-based service that allows users to run code without managing compute resources.
You can create and manage cloud functions using the Cloud Portal.
Publish Cloud Functions using the Cloud Portal
Create a Cloud Function
Cloud Functions can be created for shared notebooks only.
-
Using Cloud Functions in the left navigation
-
Using Shared Notebooks
-
Navigate to Data Studio > Shared.
-
Select a shared notebook.
-
Select Publish (on the top right).
-
New Cloud Function
After selecting Publish, a new dialog box appears.
![Select Cloud Function in Publish Settings dialog.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt441035efba57cb26/67aba5c40830d21234d949b3/publishsettings-tO72WK.png?width=850&disable=upscale&auto=webp)
Publish Settings |
|
---|---|
Publish as |
Select Cloud Function. |
Name |
Enter a name for the cloud function. |
Description |
Enter the cloud function description. |
Notebook |
Select a shared notebook to publish as a cloud function. |
Deployment |
Select the SingleStore deployment (workspace) your notebook will connect to. Selecting a workspace allows you to connect to your SingleStore databases referenced in the Notebook natively. |
Select Next.
![View the summary of the cloud function settings](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt2682e920e679b1ce/67aba5dbebf5b9cc3be0e9ec/publishsummary-GCKp4M.png?width=850&disable=upscale&auto=webp)
Select Publish to publish your notebook as a cloud function.
Manage an Existing Cloud Function
To view an existing cloud function, select Cloud Functions in the left navigation.
View a Cloud Function
To view a cloud function, select the cloud function name under the Name column.
![View the cloud function in the Cloud Functions and select the cloud function name under the Name column.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt508f512cc331ee31/67aba5dbd352330a3c715d1d/cfunc1-7yr6MH.png?width=850&disable=upscale&auto=webp)
You can view the following details for each cloud function:
![View the cloud function details after selecting the cloud function name under the Name column in Cloud Functions.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt576b92c45b61b36b/67aba5c4f58a7e45b5da9562/cfunc2-C8O3cC.png?width=850&disable=upscale&auto=webp)
You can view the details of a cloud function on the right navigation pane.
Update a Cloud Function
To update an existing cloud function, select the ellipsis in the Actions column of the cloud function, and select Update.
![Update the cloud function after selecting Update in the Actions column. Shows the dialog to update the cloud function settings.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt5a807d49698df0bd/67aba5c41452496d88fe0129/updatecfunc-hm4Ag5.png?width=850&disable=upscale&auto=webp)
You can also update the cloud function from a shared notebook.
![Select Update Cloud Function in the notebook in order to update the cloud function.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt32213767baad19d0/67aba5c3bef6775887de3b10/cfuncupdatenotebook-zk7Sew.png?width=850&disable=upscale&auto=webp)
Select Update Cloud Function.
![Shows the dialog to select the Update Cloud Function button after selecting the Update Cloud Function button in the notebook or Update option in the Actions Column in Cloud Functions page.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt231d26cc567d7484/67aba5cfbef677c4e6de3b12/cfuncupdatenb-67GPhO.png?width=850&disable=upscale&auto=webp)
Delete a Cloud Function
To delete an existing cloud function, select the ellipsis in the Actions column of the cloud function, and select Delete.
Status of Cloud Functions
Status |
Description |
---|---|
Initializing |
The notebook is creating or updating the cloud function. |
Active |
The notebook is successfully published as a cloud function. |
Failed |
The cloud function is not configured correctly. |
Error |
An error unrelated to the notebook code prevented the cloud function from initializing. |
Troubleshoot Cloud Functions
automatically saves a snapshot of the notebook for each execution that fails.
Error |
Solution |
---|---|
Workspace Deleted |
Update the cloud function and select a deployment. |
Workspace Suspended |
Resume the workspace, or create a new cloud function with a different deployment. |
Database Detached |
Reattach the database with the right permissions or create a new cloud function with a different database. |
Notebook Deleted/Not Present |
Create a new cloud function with a different notebook. |
Internal Errors/Misc |
Reach out to SingleStore Support or use the chat feature in the Cloud Portal. |
Last modified: December 5, 2024