Before we can tinker with the data, we need to describe it with a data schema. The data schema is a high-level domain-specific description of your data. It allows you to skip writing SQL queries and rely on Cube.js to generate them for you.
As the console output suggests, please navigate to localhost:4000 — this application is Cube.js Developer Playground. It's able to generate an initial version of the data schema automatically. Go to the "Schema" tab, select all tables under "public", and click the "Generate Schema" button.
That's all. You can check that in the
schema folder there's a number of files containing the data schema files:
Now we have the data schema in place. Let's explore the data!
Go to the "Build" tab, click "+ Dimension" or "+ Measure," and select any number of dimensions and measures. For example, let's select these measures and dimensions:
Line Items Pricemeasure
Line Items Quantitymeasure
As the result, you should get a complex, lengthy table with the data about our e-commerce enterprise:
Looks interesting, right? Definitely feel free to experiment and try your own queries, measures, dimensions, time dimensions, granularities, and filters.
Take note that, at any time, you can click the "JSON Query" button and see the query being sent to Cube.js API in JSON format which, essentially, lists the measures and dimensions you were selecting in the UI.
Later, we'll use this query to fill our upcoming pivot table with data. So, let's move on and build a pivot table! 🔀