SQL to Sigma – 5 Tips for Getting Started
So you’re making the switch to Sigma but want to keep your SQL reports? We hear you. Sigma is designed to give both SQL lovers and spreadsheet aficionados unparalleled access to their data. Sigma will unlock new possibilities for your team, without you ever having to give up the parts of SQL you love. We have the rich features expected from a modern development environment, along with a familiar spreadsheet experience backed by the full power of SQL.
To help you get started, we’ve put together a few tips for your transition. Check them out!
1. Write Code with the SQL Runner
Do you have pages of SQL queries saved that get the results you need from the data warehouse?
Are you more comfortable exploring data with SQL? Then Sigma’s SQL Runner is for you. The SQL Runner offers a first-class experience for writing SQL, while letting you seamlessly transition to Sigma’s visual interface to share and collaborate with coworkers.
The SQL Runner brings context to data exploration. Navigate a tree menu of your cloud data warehouse or preview the data from tables in the same window that you write SQL query. Descriptions of the tables and columns are visible to provide more information as you work.
The process of writing queries is on par with modern Integrated Development Environments (IDEs). Autocomplete functionality ensures that you will always target the correct table or column. Keyboard shortcuts help you navigate your code easily. Automatic SQL formatting keeps things readable. Plus, there is a history of every SQL query you run, letting you quickly reference old work.
With Sigma, you can also go beyond the SQL runner environment. Turn your SQL query into a Worksheet that you and others use to explore data visually. Then build visualizations on top of your SQL queries, helping conceptualize your data. Read on to find out more.
2. Explore Data in a Worksheet Environment
Any SQL query can be converted into a Sigma Worksheet. This gives you the opportunity to explore data in a different interface. Sigma Worksheets translate a user’s actions into SQL. As you work, Sigma’s generated SQL builds on top of the original code used to create the Worksheet.
Within the Worksheet’s UI, you wield powerful SQL functionality— including window functions. Some things that are difficult and tedious to write in SQL are a breeze to complete in Sigma. For example, you can calculate aggregates across groups, easily calculating percent of total and other more complex correlated subqueries.
Levels and Groups make it easy to create and explore with the Worksheet. The visual interface allows you to create groups and calculations that generate SQL subqueries. Just drag a column and create the subquery you need rather than spending the time writing code.
All the groups are visually represented within the worksheet, and you can expand and collapse the different levels to quickly see summaries of your data.
To check the SQL generated by Sigma, click on the icon in the upper left of your screen and scroll through to see what been generated at any time. You can also run the SQL directly in your data warehouse to get the same results you see in Sigma.
3. Build Visualizations
Sigma Worksheets allow you to build charts on top of your SQL queries. It give you the ability to Visualize your data while staying connected to the cloud data warehouse.
Build all of the most common chart types, including line charts, map charts, scatter plots, pie charts, bar charts, grouped bar charts, and combination charts with bars and lines. You can also create table visualizations such as pivot tables, tables, and the ‘big number’ charts that are customized to match your company’s style.
Charts exist in worksheets and can be viewed within the dashboards you build from those charts.
Visualizations go beyond the basic chart types. Drill down charts guide users through data. And parameters pass through user-entered information to the charts. Sigma has a full suite to build the visualizations that best communicate your data
4. Join Data Visually
Join SQL-based worksheets to any data source, including tables, SQL queries, or even a CSV you upload. Sigma lets you create and preview the four most common SQL joins visually. Create a left, right, inner, or full outer joins using Sigma’s interface. You can preview the results of your join to confirm it is what you expect.
Sigma also has a unique join type called the lookup join. This functions like VLOOKUP in Excel, and prevents fan outs. The lookup join searches for matches in data similarly to a left join. If there is more than one match, rather than adding rows, the lookup join returns an asterisk. This means that the number of rows present in a worksheet will not change because of a lookup join.
Joins created via Sigma’s visual interface can have all of the complexity and nuance of SQL joins. Multiple join keys can be set up for each join. Tables and worksheets can be joined together based on columns that exist in the table that aren’t visible in the worksheet.
Worksheets can be joined to other Worksheets as well as to additional tables. You can create Worksheets from your SQL queries, then later decide to join those Worksheets together.
5. Collaborate with Business Experts
Sigma Worksheets make sharing the results of a SQL query easy. It also makes the work you do creating a SQL query reusable. Rather than running a query and sending the resulting CSV file to business users manually every time they need updated data, you can share a Sigma worksheet with them once. From there, they can explorations as needed using the Sigma interface. It lets them build the analysis and visualizations that matter most to them in an environment that always keeps their data up to date.
Scheduled reports email consumers links to the worksheets that contain their data, or even exports of up to 100k rows of data.
Sigma’s environment caters to both SQL programmers and spreadsheet users— giving companies a single place for all of user’s to work. Rather than combating shadow IT with a suite of tools that don’t , Sigma provides a centralized data hub where everyone can utilize the platform comfortably.