The JSON file country_sales.json is accessed directly by RAW. Since it contains nested data, we "denormalize" it by turning it into a regular flat table, through a SQL extension (see the FROM statement). The data is also cleaned: item IDs are added a "i#" prefix and the date field is converted into a timestamp.

The file products.txt is a plain text file containing the description of products. The text file is converted into a structured collection of records using the PARSE AS keyword, which splits the string into tokens, and converts each token into a record. As a result, items now looks like a regular SQL table and can be queried as such.

Now that country_sales and items are regular tables, these can be joined. This query joins a JSON file with a text file, both of which have been preprocessed using RAW queries.

Note that no schemas were created, no data was explicitly loaded and no separate ETL process or scripts were needed: these optimizations are all done internally by RAW and transparent to the user.

This is live demo. Use the editor to type queries, as soon as a query is valid it will run automatically

In this area you can see the results, you can change the plot by using the drop-down button.

In the bottom area you have your data sources. You can edit them too, Enjoy!