SQL on anything

Use the Peliqan SQL query editor to write SELECT queries on any data source, including JOIN queries that join data from different sources.

Optionally you can run your SQL queries on Peliqan’s built-in query engine Trino, in order to join data between separate databases and data warehouses.

Referencing tables and views in queries

Referencing a table


SELECT * FROM databasename.schema.tablename;
SELECT * FROM schema.tablename;
SELECT * FROM tablename;

Referencing a view

It is also possible to reference a view that is defined on a table. Views are useful to e.g. filter the data. A view is appended to the table name using an underscore. Example:

SELECT * FROM databasename.schema.tablename_viewname;

Referencing the “_original” view

If you want to fetch the source data without any changes applied (e.g. transformations), append “_original” to the table name:

SELECT * FROM databasename.schema.tablename_original;

Common examples

Filter records after a specified date:

SELECT * FROM some_table where some_date_column > date '2021-12-25'

Cast a column to a different format:

SELECT CAST(some_column AS float) FROM some_table

Custom SQL functions