An Elementary Introduction to the Wolfram Language
43Storing Things
Cloud objects are immediately assigned a UUID:
Click for copyable input
Click for copyable input
Click for copyable input
If youve made definitions using = and :=, you can save these using CloudSave. (If your definitions depend on other definitions, these will get saved too.) You can load your definitions into a new session using CloudGet.
Make a definition:
Click for copyable input
Save it in the cloud to be retrieved later using CloudGet:
Click for copyable input
CloudPut lets you store single Wolfram Language expressions. But what if you want to progressively accumulate expressionscoming either from within the Wolfram Language, or, say, from an outside device or sensor?
The Wolfram Data Drop lets you do exactly this. You start by creating a databin. You can do this in the Wolfram Language using CreateDatabin.
Create a databin:
Click for copyable input
Add an entry to a databin:
Click for copyable input
Add another entry to the same databin:
Click for copyable input
Click for copyable input
Use a short ID to reference a databin connected to sensors on my desk:
Click for copyable input
Click for copyable input
Wolfram Data Drop, like CloudPut and CloudSave, saves data into the cloud. But particularly if youre not connected to the cloud, you may instead want to store things on a local computer. If you figure out where in your filesystem you want the files to go, you can use Put, Save and Get to store and retrieve them.
Click for copyable input
Put an image to the location:
Click for copyable input
Get the image back:
Click for copyable input
CloudObject[] create a cloud object
CloudPut[expr] put into the cloud
CloudGet[obj] get from the cloud
CloudSave[s] save definitions to the cloud
Databin["id"] a databin with accumulated data
CreateDatabin[] create a new databin
DatabinAdd[obj,value] add something to a databin
DateListPlot[data] make a date list plot
LocalObject[] create a local object
Put[expr,obj] put into a local object
Get[obj] get from a local object
What do the letters and numbers in UUIDs mean?
How does the number of possible UUIDs compare to other things?
All short IDs as generated by URLShorten are explicitly registered, and guaranteed to be unique, a bit like domain names on the internet. UUIDs are long enough that they can be assumed to be unique, even without any kind of central registration.
Yes. And the file name will be taken to be relative to your home directory in the cloud. The file will also get a URL, that includes the base of the cloud youre using, and your user ID.
Not usually. But if you set the option Permissions"Public" then everyone can access it, just like we discussed for web apps in Section 36. You can also define exactly who you want to allow to do what with it.
Can I work with databins without using the Wolfram Language?
Yes. You can use the web and many other systems to create and add to databins.
Yes. Make it a cloud expression (using CreateCloudExpression). Then all the usual ways of getting and setting parts of the expression will work, but the expression will be persistently stored in the cloud.
Download Notebook Version