Starburst Galaxy’s convenient query editor allows you to author queries using SQL.
Access the query editor from the Query section of the navigation menu, and query our built-in sample datasets.
Here is an example of a simple query you can try:
SELECT name FROM tpch.tiny.nation ORDER BY name LIMIT 5;
The result set:
The query editor comes with sample data and built-in queries that let you perform query federation.
These queries analyze Burst Bank’s customer base and identify at-risk credit card holders across multiple data sources. Here is a preview of what you can expect to see in Galaxy:
1. Customer master data is stored in PostgreSQL, Burst Bank’s record system. Run the following query to find customers with a FICO score below 500:
SELECT c.first_name, c.last_name, c.fico
FROM federated_postgres.burstbank.customer c
WHERE c.fico < 500;
2. Burst Bank’s record system is stored in PostgreSQL, while account data resides in MySQL. Run the following query to join the sources and find customers with credit scores below 500 who also hold a credit card:
SELECT c.first_name, c.last_name, c.fico,
a.cc_number, a.cc_open_date
FROM federated_postgres.burstbank.customer c
-- source 1: PostgreSQL
JOIN federated_mysql.burstbank.account a
-- source 2: MySQL
ON c.custkey = a.custkey
WHERE c.fico < 500;
3. Credit card payment history, including all payments, is stored in Burst
Bank’s data lake on Amazon S3. Run the following query to join in a third
catalog and filter for delinquent payments. Use the HAVING clause to find
customers with more than three missed payments:
SELECT c.first_name, c.last_name, c.fico,
a.cc_number, a.cc_open_date,
count(cp.delinquent_payment) AS num_delinquent_payments
FROM federated_postgres.burstbank.customer c
-- source 1: PostgreSQL (customer master / FICO)
JOIN federated_mysql.burstbank.account a
-- source 2: MySQL (accounts / credit cards)
ON c.custkey = a.custkey
JOIN federated_s3.burstbank.credit_card_payment cp
-- source 3: AWS (payment transaction history)
ON cp.cc_number = a.cc_number
WHERE cp.delinquent_payment = 'Y'
AND c.fico < 500
GROUP BY a.cc_number, c.first_name, c.last_name,
a.cc_open_date, c.fico
HAVING count(cp.delinquent_payment) > 3;
The result set of at-risk credit card holders:
Galaxy supports access to object-based storage, relational, and non-relational database management systems. When you are ready, you can query data from your own data sources.
Is the information on this page helpful?
Yes
No