Skip to main content

SQL support in RAW

info

SQL support in RAW is currently in Closed Beta. Contact us for early access.

The RAW platform supports building endpoints using SQL. The key considerations are:

  • Only SELECT operations are supported;
  • The SQL variant used is PostgreSQL syntax. Therefore, you can reference PostgreSQL's documentation to write RAW SQL queries;
  • Most major features of SQL::2023 specification are supported;
  • The connectors available for SQL endpoints may diverge from those available for the remaining languages in the platform.

How are data sources supported?

In general, each new data source appears as a new schema and set of tables that are available to query.

For instance, if we add a MySQL data source called 'mysql01', then a new schema called "mysql01" will be available and within it all tables from the MySQL source system will be available.

For other data sources that are not themselves relational databases - e.g. Salesforce - RAW provides a pre-defined set of tables within the newly-available schema. These "virtual tables" are designed to represent the business entities and data structures inherent to each specific data source. Queries to these tables will be automatically translated to calls to the remote source - e.g. a query to the virtual Salesforce table will be translated to a remote call to the Salesforce API.

This design allows users to query these diverse data sources using standard SQL queries, making the experience consistent and efficient across different types of data systems. The result is a unified querying interface where SQL can be used to interact with a wide array of data types and sources, simplifying data integration and analysis tasks.

When to use SQL vs other languages?

  • Ease of Use: The familiar syntax of SQL makes data querying in RAW more intuitive and accessible for SQL experts.
  • Tabular data: Consider writing SQL endpoints if your input and output data consists only of tabular data. Otherwise, you may need to use other languages that support the operations you need.
  • Connectors Available: The connectors available for SQL endpoints may diverge from those available for the remaining languages in the platform.

Next Steps

  • Check our SQL By Example guide. This includes basic examples to get started;
  • Learn about supported Data Sources and the table mappings for each type of data source.