Start Here!
In this tutorial you will learn how to:
  1. 1.
    Sign up / sign in to TileDB Cloud
  2. 2.
    Access a public array using the TileDB-Py library
  3. 3.
    Access basic array information using the TileDB Cloud client
  4. 4.
    View the public array on the TileDB Cloud console
  5. 5.
    View a task on the TileDB Cloud console
  6. 6.
    View and edit your profile on the TileDB Cloud console

Sign Up & Sign In

First, sign up and you will get $10 in free credit. Feel free to contact us if you run out of credits and you are still evaluating TileDB Cloud, we'll be happy to help out with more credits. Then simply sign in with the username and password you created.

Access a Public Array

It is extremely easy to access arrays registered with TileDB Cloud via the core TileDB Embedded APIs, with literally a single change: adding your username/password as configuration parameters. In this tutorial we will use TileDB-Py. Let's first install it with:
Python
R
1
# Pip:
2
$ pip install tiledb
3
4
# Or Conda:
5
$ conda install -c conda-forge tiledb-py
Copied!
1
# Via CRAN
2
install.packages("tiledb")
Copied!
To validate the installation, run:
Python
R
1
$ python
2
>>> import tiledb
3
>>> tiledb.__version__
4
'x.y.z' # The version will appear here
Copied!
1
$ R
2
> library(tiledb)
3
> packageVersion("tiledb")
4
'x.y.z' # The version will appear here
Copied!
For Python, also make sure you have already installed pandas and pyarrow, or alternatively run:
1
$ conda install pandas
2
$ conda install -c conda-forge pyarrow
Copied!
We have added a couple of public arrays that every user on TileDB Cloud can access, under our TileDB-Inc organization. Below we show an example for getting the schema of array tiledb://TileDB-Inc/quickstart_sparse, and slicing its contents:
Python
R
1
import tiledb
2
3
# Set your username and password
4
config = tiledb.Config()
5
config["rest.username"] = "xxx"
6
config["rest.password"] = "yyy"
7
8
# This is the array URI format in TileDB Cloud
9
array_name = "tiledb://TileDB-Inc/quickstart_sparse"
10
11
# Open the array
12
A = tiledb.open(array_name, 'r', ctx=tiledb.Ctx(config))
13
14
# Print the array schema
15
print(A.schema)
16
17
# This will print:
18
#
19
# ArraySchema(
20
# domain=Domain(*[
21
# Dim(name='rows', domain=(1, 4), tile=4, dtype='int32'),
22
# Dim(name='cols', domain=(1, 4), tile=4, dtype='int32'),
23
# ]),
24
# attrs=[
25
# Attr(name='a', dtype='uint32', var=False, nullable=False),
26
# ],
27
# cell_order='row-major',
28
# tile_order='row-major',
29
# capacity=10000,
30
# sparse=True,
31
# allows_duplicates=False,
32
# coords_filters=FilterList([ZstdFilter(level=-1)]),
33
#)
34
35
# Print all the contents of the array
36
print(A.df[:])
37
38
# This will print
39
#
40
# rows cols a
41
# 0 1 1 1
42
# 1 2 3 3
43
# 2 2 4 2
44
45
# Close the array
46
A.close()
Copied!
1
library(tiledb)
2
3
# Set your username and password
4
config <- tiledb_config()
5
config["rest.username"] <- 'xxx'
6
config["rest.password"] <- 'yyy'
7
ctx <- tiledb_ctx(config)
8
9
# This is the array URI format in TileDB Cloud
10
array_name = "tiledb://TileDB-Inc/quickstart_sparse"
11
12
# Open the array
13
arr <- tiledb_array(array_name, return_as='data.frame')
14
15
# Print the array schema
16
schema(arr)
17
18
# This will print:
19
# tiledb_array_schema(
20
# domain=tiledb_domain(c(tiledb_dim(name="rows", domain=c(1L,4L), tile=4L, type="INT32"), tiledb_dim(name="cols", domain=c(1L,4L), tile=4L, type="INT32"))),
21
# attrs=c(tiledb_attr(name="a", type="UINT32", ncells=1, nullable=FALSE)),
22
# cell_order="ROW_MAJOR", tile_order="ROW_MAJOR", capacity=10000, sparse=TRUE, allows_dups=FALSE,
23
# coords_filter_list=tiledb_filter_list(c(tiledb_filter_set_option(tiledb_filter("ZSTD"),"COMPRESSION_LEVEL",-1))),
24
# offsets_filter_list=tiledb_filter_list(c(tiledb_filter_set_option(tiledb_filter("ZSTD"),"COMPRESSION_LEVEL",-1))))
25
26
# Print all the contents of the array
27
df <- arr[]
28
df
29
30
# This will print
31
# rows cols a
32
# 1 1 1 1
33
# 2 2 3 3
34
# 3 2 4 2
35
36
# Close the array
37
tiledb_array_close(arr)
Copied!
Congratulations! You just performed your first array query to a public array in TileDB Cloud!

Access via the TileDB Cloud Client

The TileDB Client is a separate Python package that allows you to perform pretty much any kind of task you would otherwise do via the TileDB Cloud online console (also described later in this tutorial). Let's first install it with:
Python
R
1
# At your shell prompt
2
pip install tiledb-cloud
Copied!
1
# At your shell prompt
2
# See https://github.com/TileDB-Inc/TileDB-Cloud-R/releases for latest:
3
remotes::install_github('TileDB-Inc/[email protected]')
Copied!
Check that it installed properly as follows:
Python
R
1
$ python
2
>>> import tiledb.cloud
Copied!
1
$ R
2
> library(tiledbcloud)
Copied!
Let's get the description of the array we used above:
Python
R
1
import tiledb.cloud
2
3
# Set your username and password
4
config = tiledb.Config()
5
config["rest.username"] = "xxx"
6
config["rest.password"] = "yyy"
7
8
info = tiledb.cloud.info("tiledb://TileDB-Inc/quickstart_sparse")
9
print(info)
10
11
# This prints:
12
#
13
# {'access_credentials_name': None,
14
# 'allowed_actions': ['read', 'read_array_info', 'read_array_schema'],
15
# 'description': '# Quickstart Sparse Array\n'
16
# '\n'
17
# 'This is a very simple 2D sparse array, used to quickly '
18
# 'demonstrate basic TileDB Cloud functionality.',
19
# 'file_properties': None,
20
# 'file_type': None,
21
# 'id': '69ca9424-2578-44d0-8662-87897d9e2941',
22
# 'last_accessed': datetime.datetime(2021, 5, 3, 19, 1, 15, tzinfo=tzutc()),
23
# 'license_id': 'MIT',
24
# 'license_text': 'MIT License Copyright (c) <year> <copyright holders>\n'
25
# '\n'
26
# 'Permission is hereby granted, free of charge, to any person '
27
# 'obtaining a copy of this software and associated '
28
# 'documentation files (the "Software"), to deal in the '
29
# 'Software without restriction, including without limitation '
30
# 'the rights to use, copy, modify, merge, publish, distribute, '
31
# 'sublicense, and/or sell copies of the Software, and to '
32
# 'permit persons to whom the Software is furnished to do so, '
33
# 'subject to the following conditions:\n'
34
# '\n'
35
# 'The above copyright notice and this permission notice '
36
# '(including the next paragraph) shall be included in all '
37
# 'copies or substantial portions of the Software.\n'
38
# '\n'
39
# 'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY '
40
# 'KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE '
41
# 'WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR '
42
# 'PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS '
43
# 'OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR '
44
# 'OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR '
45
# 'OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE '
46
# 'SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.',
47
# 'logo': None,
48
# 'name': 'quickstart_sparse',
49
# 'namespace': 'TileDB-Inc',
50
# 'namespace_subscribed': False,
51
# 'pricing': None,
52
# 'public_share': True,
53
# 'share_count': 1.0,
54
# 'size': 903.0,
55
# 'subscriptions': None,
56
# 'tags': None,
57
# 'tiledb_uri': 'tiledb://TileDB-Inc/quickstart_sparse',
58
# 'type': 'sparse',
59
# 'uri': None
Copied!
1
library(tiledbcloud)
2
3
# Set your username and password
4
config <- tiledb_config()
5
config["rest.username"] <- 'xxx'
6
config["rest.password"] <- 'yyy'
7
ctx <- tiledb_ctx(config)
8
9
info <- tiledbcloud::array_info(
10
namespace="TileDB-Inc",
11
arrayname="quickstart_dense"))
12
13
str(info)
14
15
# This prints:
16
# List of 14
17
# $ id : chr "2d6e7def-851e-4832-ae92-202af1f6940d"
18
# $ namespace : chr "TileDB-Inc"
19
# $ size : int 835
20
# $ last_accessed : chr "2022-02-28T17:39:48Z"
21
# $ description : chr "# Quickstart Dense Array\n\nThis array is the results of running the quickstart dense example program. This arr"| __truncated__
22
# $ name : chr "quickstart_dense"
23
# $ type : chr "dense"
24
# $ share_count : int 1
25
# $ public_share : logi TRUE
26
# $ namespace_subscribed: logi FALSE
27
# $ tiledb_uri : chr "tiledb://TileDB-Inc/quickstart_dense"
28
# $ tags : list()
29
# $ license_id : chr "MIT"
30
# $ license_text : chr "MIT License Copyright (c) <year> <copyright holders>\n\nPermission is hereby granted, free of charge, to any pe"| __truncated__
Copied!
Great work! In the following we will see how to view useful information directly through the TileDB Cloud console.

Using the TileDB Cloud Console

You can view the information of public arrays by directly navigating to the array's URL on TileDB Cloud, even if you are not signed in (TileDB Cloud provides "static view" of arrays). For example, you can click directly on https://cloud.tiledb.com/arrays/details/TileDB-Inc/quickstart_sparse/overview, which is the URL of the array we used in the previous sections. Once you do so, you will see:
Click on the Schema tab to see the array schema:
Next, let's sign in and see some activity logs. Click on Tasks on the left-hand side menu, under Assets:
Here you can see the various tasks that you have performed (like slicing an array), along with other information, such as the time, cost, duration, etc. Clicking on a task provides further information (to be coved in other tutorials).
Finally, you can view your profile by clicking on your avatar located on the upper right of the screen, and clicking on Settings:
Here you can edit your personal information, change your password, etc.
Congratulations! You have successfully completed your very first TileDB Cloud tutorial!
🎉

What's Next?

Are interested in diving deeper into TileDB Cloud? Here is what we recommend you to do next.
Quick recipes:
Next tutorials: