Announcing Tableland Console

Announcing Tableland Console

The Tableland Console makes it easy for developers to create, interact with, and explore their tables on the Tableland network.

Announcing Tableland Console

The Tableland Console makes it easy for developers to create, interact with, and explore their tables on the Tableland network.

We’re excited to announce the beta release of a new user interface for Tableland: The Tableland Console.

Tableland is an innovative protocol that brings Web3 developers the power and security of the blockchain with the flexibility of relational tables. Tableland is the Web3 database, powered by SQL. The console brings the power of that protocol to developers and users alike, in a simple, accessible interface.


Why we built the console

Relational tables are one of the most powerful structures for dealing with data. Much of that power comes from their flexibility; tables can be used by experts and newcomers alike. We wanted to make sure we created an experience welcoming to all.

If you’ve worked with SQL databases before, chances are you’ve used an admin panel of some sort to get a handle on things. The experience should feel familiar, with some features scaled back and other novel experiences added for integrating into the blockchain.

Spin up a table. Run queries against it right from your browser. If you’re a multi-tasker, the tabbed interface allows you to manage multiple queries and table creations at once. If you’re comfortable with SQL, you’ll be comfortable creating, querying, and managing your Web3 database using raw SQL.

We believe in a multi-chain world, and the console’s interface allows you to work across the chains that Tableland’s testnet supports, switching easily between supported networks, testnets and mainnets.

Under the hood, the console uses our SDK, and our custom SQL parser. We look into these a bit later in this post.

Building the console

The Layout

The Layout for the console is inspired by many apps built to work with SQL databases. The console has a tabbed interface, with two different type of tabs.

  1. Create table tab
  2. Simple query tab

The create table tab type guides you through creating a table. The simple query tab lets you write SQL statements and submit them to the network.

One novel aspect of the console which you won’t find in other database interfaces is the commits tracking. There is a concept of a commit in traditional databases, but those aren’t quite what we’re looking at. Commit tracking watches the transaction you submitted to the network. The console keeps track of the transaction all the way from the application sending it to your wallet, to submission to the underlying chain (Ethereum, Polygon, etc), and finally detects the validator applying the commit to the materialized database.

Tying these all together, the console makes simple operations on your Tableland table easy to execute. And there’s more to come in the future. If you’re curious, skip down to “The future of the console”

Shoutout to our SQL Parser

SQL queries are pretty neat, and there’s a lot to them. In Tableland, we distinguish between write queries and read queries. Queries that make no alterations to the database are read queries, queries that insert, update, and delete data are write queries. Write queries require a transaction on the network. Among other things, we use the parser to sort out which queries go directly to the Tableland smart contract, and which are sent to a validator to fetch data from the network.

The SQL Parser also allows us to return the name of the table to which a developer is writing or reading. This is useful when you want to perform other actions with the tables in your app, or validate those tables on the network.

The most visible use of the parser is in the Dashboard, and it is a bit subtle: we simply change the text of the Query button based on whether you’ve written a write statement or a read statement. For a select query, like SELECT * FROM healthbot_1_1, the button to fire off the query will read “Query”. If instead you write INSERT INTO healthbot_1_1 values (2);, the button will read “Commit”. This is because “Commit” is a pretty clear signal of what you’re about to do; commit the change to the network.

The parser comes in two parts; the parser itself, written in go, and the WASM wrapper library, which allows it to be used in the browser. These are open source, and can be found here (go-parser) and here (wasm-sqlparser).

Using the Tableland SDK

Part of the fun of building the console was the opportunity to use the tools we are furnishing for all of our community to use. The indispensable framework the console is built off of is the SDK. This SDK enables seamless interfacing with the Tableland gateway, the Smart Contract, your wallet, and the application.

Getting started building a dapp using Tableland? Use the SDK — you’ll be glad you did.

Hidden features

Okay, okay, I know it’s not very hidden if you announce that it is there in the announcement post. But there are some features that we’re working on that, while not available to your average user (because they’re not fully polished), can be accessed by the savvy user. I won’t give too much away, (where’s the fun in that?!), but if you’re curious you might go poking around in the console’s github repository. It is, after all, open source. Have you noticed we’re big fans of open source? While you’re in there, feel free to open an issue or even make a pull request. Contributions are welcome!

The future of the console

This is a beta release of our console. There’s a lot more to come, and we hope that involves you, the community. A few things already on our roadmap:

  • Table access control management. At the moment, access control on Tableland is managed through either use of Grant/Revoke statements, or a Smart Contract. We’ll be streamlining this process, setting the network up such that the “GRANT/REVOKE” methods of access control for the table is merely an instantiation of the smart contract controller method. Once this change has been made, the console will receive updates to allow you to manage these permissions.
  • Data visualization. Data on Tableland is just like data in any other table, except that it is controlled in a decentralized manner. Visualizing your data in the console will feel similar to other database tools.
  • Network explorer. We’re exploring allowing users to discover, find, and curate tables across the network. If you’re itching to explore tables on the network, our amazing community already has a few of these functions covered. The team at created Beautiful work.
  • Importing and exporting tables using JSON, CSV, and SQLite files. Importing to Tableland is a little trickier than exporting, and we’d like to nail the experience and even build importing into the protocol’s tooling. As that happens, we’ll build it into the console.
  • Get started on Tableland without Wallet
  • Combining network tables with offline assets

And more! If there’s something you’d like to see in the console, visit the open source repository. We’re always accepting feedback. In fact…

Get involved

As I mentioned, the console is open source! Fork it, contribute to it, submit issues. We will be working with the community to bring new features and optimizations to the experience. We are community driven and would be thrilled to hear from you.

Lastly, if you’d like a quick video tour of the Dashboard, check this out.

We look forward to seeing what you build on Tableland.