Connect to Turbot Pipes from Tableau
Tableau is a visual analytics platform that is "transforming the way we use data to solve problems."
Steampipe provides a single interface to all your cloud, code, logs and more. Because it's built on Postgres, Steampipe provides an endpoint that any Postgres-compatible client -- including Tableau -- can connect to.
You can get the information needed to connect to your Turbot Pipes database instance from the Query tab for your workspace. On the Query tab, click the info button at the top of the query window to show the connection information.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Fquery-info-connect.png&w=3840&q=75)
Once you've tested the connection to Turbot Pipes, you can browse the tables provided by your Steampipe plugins, run queries, and build dashboards.
You can also connect Tableau to Steampipe CLI.
To do that, run steampipe service start --show-password
and use the displayed
connection details.
Steampipe service is running:
Database:
Host(s): localhost, 127.0.0.1, 172.28.158.171 Port: 9193 Database: steampipe User: steampipe Password: 9a**-****-**7e Connection string: postgres://steampipe:9a**-****-**7e@localhost:9193/steampipe
Getting started
Tableau is available on the desktop and the cloud. The examples here use Tableau Online, so start by creating an account there if you don't already have one.
Create a Tableau Project
called Steampipe
. In the project, create a
workbook. On the Connect to Data
screen that pops up, click
Connectors → PostgreSQL
and enter your Turbot Pipes connection info.
Require SSL
is unchecked by default and that's OK, it's also OK to check it.
Now drag the aws_cost_by_service_daily
table from the sidebar to the canvas,
then click Update Now
. Tableau displays the table's schema, and previews the
data.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-initial-table-view.jpg&w=3840&q=75)
Summarize and chart one AWS table
Switch from the workbook's Data Source
tab to its Sheet 1
tab. Drag the
Blended Cost Amount
column to the Rows
shelf, and the Period Start
column
to the Columns
shelf.
The Period Start
indicator defaults to YEAR. Open its dropdown and choose the
second Day
option which reports full dates. Tableau charts the daily sums of
costs for all your AWS services.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-initial-chart.jpg&w=3840&q=75)
Publish the workbook as daily cost for all AWS services
, and check
Embed password for data source
.
Use Tableau-enhanced SQL
Now create another new workbook in the project. Repeat the steps to connect it
to Turbot Pipes, and again drag the aws_cost_by_service_daily
table to the
canvas.
This time, open the aws_cost_by_service
dropdown and choose
Convert to Custom SQL
.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-convert-to-custom-sql.jpg&w=3840&q=75)
In the Convert to SQL
editor, replace code with the following.
select service, blended_cost_amount, period_startfrom aws_cost_by_service_dailywhere service =order by period_start
Then click Insert Parameter → Create a New Parameter
. Name the parameter
Service
, set its type to String
, for Allowable Values
chose List
, click
Add Values From
, and choose Service
.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-create-parameter.jpg&w=3840&q=75)
Click OK
, then (if necessary) edit the Convert to SQL
text so it reads like
so.
select service, blended_cost_amount, period_startfrom aws_cost_by_service_dailywhere service = <Parameters.Service>order by period_start
Click OK
. Then visit the Sheet 1
tab, choose
Parameters → Service → Show Parameter
.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-initial-sheet-with-service-dropdown.jpg&w=3840&q=75)
The sheet now has a chooser for AWS services.
As before, drag Blended Cost Amount
to the Rows
shelf, drag Period Start
to the Columns Shelf
, and set Period Start
to day
.
Tableau charts the selected service.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-chart-selected-service.jpg&w=3840&q=75)
Publish the workbook as daily cost for selected service
, again with
Embed password for data source
.
Send alerts
Open the project (Explore → Steampipe
), reopen the
daily cost for all AWS services
workbook, reopen Sheet 1
, and click
Watch → Alerts
.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-initial-watch-alerts.jpg&w=3840&q=75)
Select the Blended Cost Amount
axis.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-select-axis-to-create-alert.jpg&w=3840&q=75)
Then click Create
and fill in the details: Condition
, Threshold
, etc.
![](/_next/image?url=%2Fimages%2Fdocs%2Fpipes%2Ftableau-create-alert-dialog.jpg&w=3840&q=75)
Summary
With Tableau and Turbot Pipes you can:
Summarize, filter, and chart the tables in your Turbot Pipes workspace
Create interactive widgets driven by data in those tables
Send query-driven alerts