Nathan Daly
16 October 2021
less than a minute read
You can use help:relation
(where relation represents a specific name) to display a relation’s documentation rendered from the docstring’s markdown content. This allows you to display the instructions for using a relation when working with Rel, and makes the Rel code self-documenting.
The function help
will render the relation’s docstring, if it exists, as rich HTML. When working with the SDKs, where no HTML rendering is available, you can also use docstring
to get a relation’s docstring information as a string.
All of the relations defined in our Rel libraries have docstrings that can be viewed using the help
or docstring
functionality. For example, help:load_csv
displays the documentation for load_csv
:
You can also add your own documentation by adding docstrings to your relations. To do this, use the Install cell in the RAI Notebook, add doc"""
above your relation, and write your comment in markdown before closing the section with """
.
If you then use help:myrelation
, the system will render the docstring you have created, allowing you or others to refer to further details documented for your Rel code.
We are excited to announce worksheets, a new interface for submitting Rel queries. Worksheets allow you to develop blocks of Rel code and run them against a database. They can be shared with other users using their URLs.
Read MoreWe are excited to announce the support of varargs in Rel. You can use varargs to write more general code that works for multiple arities. Varargs can be useful when writing generic relations for common utilities.
Read MoreValue types help distinguish between different kinds of values, even though the underlying representation may be identical. Value types can be used to define other value types.
Read More