Comparing a Tableau report to a database using QuerySurge

RTTStv
27 Aug 201806:49

Summary

TLDRThis video tutorial demonstrates how to use QuerySurge to validate the data in a Tableau report. The presenter navigates through a Tableau server to access an 'Economy' report, focusing on validating negative inflation rates. They compare the data displayed in the report to the backend database using a query pair in QuerySurge, which includes a source query connecting to the data mart and a target query connecting to the Tableau server. The tutorial guides viewers on configuring the 'tableau report' function with the correct report and visualization names from Tableau. The process concludes with running the query pair to validate and compare the data, identifying a discrepancy in the inflation rate for 1938 between the database and the report.

Takeaways

  • 🌐 The video demonstrates how to use QuerySurge to validate the contents of a Tableau report.
  • πŸ“Š The report in focus is an economy report displaying ESPY economic indicators with a focus on years with negative inflation rates.
  • πŸ” To validate the data, the presenter shows how to download the data from Tableau and compare it with the backend database.
  • πŸ“ The video explains the setup of a query pair in QuerySurge, which includes a source query and a target query.
  • πŸ’Ύ The source query connects to a data mart and retrieves years with negative inflation rates, while the target query connects to Tableau Server.
  • πŸ”— The 'tableau report' function in the target query requires the report name and visualization name from the Tableau instance URL.
  • βš™οΈ The target query uses a 'CAST' function to match the data format from Tableau, which returns data in string format.
  • πŸ†š The validation process compares the data from the source and target queries to check for discrepancies.
  • 🚫 The video identifies a failure in the validation process for the year 1938, highlighting a discrepancy between the backend database and the Tableau report.
  • πŸ”§ The presenter suggests taking the identified discrepancy back to the development team for further investigation.

Q & A

  • What is the main purpose of the demonstration in the video?

    -The main purpose of the demonstration is to show how to use QuerySurge to validate the contents of a Tableau report, specifically to check for any negative inflation rates.

  • How does the presenter access the Tableau report for demonstration?

    -The presenter accesses the Tableau report by navigating to a browser that connects to the Tableau server and then brings up a specific report called 'economy'.

  • What visual indicator in the report represents negative inflation rates?

    -Negative inflation rates in the report are represented by red bars in the visualization.

  • What action does the presenter take to view the data behind the graph in Tableau?

    -The presenter clicks the 'Download' button in Tableau and then clicks the 'Data' button to view the data behind the graph.

  • What are the two components of a query pair in QuerySurge?

    -A query pair in QuerySurge consists of a source query and a target query.

  • What does the source query in QuerySurge connect to?

    -The source query connects to the data mart, which is the database that stores the information represented by the Tableau report.

  • How does the presenter configure the target query in QuerySurge to connect to Tableau?

    -The presenter configures the target query to connect to the Tableau server and uses a function called 'tableau report' with parameters for the report and visualization names.

  • What information is required for the 'tableau report' function in QuerySurge?

    -The 'tableau report' function requires the report name and the visualization name from the Tableau instance.

  • How does the presenter identify the report and visualization names in Tableau?

    -The presenter identifies the report name by taking the portion of the URL after the server that specifies the report name, and the visualization name by copying the sheet name from the 'Rename' option in the Tableau interface.

  • What does the presenter do to investigate a discrepancy found during the validation process?

    -The presenter investigates the discrepancy by viewing the query results, analyzing the failure, and comparing the data from the backend system with the report's display.

  • What is the final step the presenter suggests after identifying a discrepancy?

    -The final step suggested is to take the discrepancy back to the development team to track down and resolve the issue.

Outlines

00:00

πŸ“Š Validating Tableau Report with Query Search

The speaker begins by demonstrating how to use QuerySurge to validate the contents of a Tableau report. They navigate to a browser connected to the Tableau server and open a specific report named 'economy' which displays ESPY economic indicators. The focus is on validating the inflation rate for years with negative values, represented by red bars in the visualization. The speaker explains how to download the data from Tableau to view the actual values behind the graph. To compare this data with the backend database, they access QuerySurge and open a query pair called 'negative inflation rate'. This query pair consists of a source query connecting to the data mart (the database) and a target query connecting to the Tableau server. The source query selects years and average inflation rates from the economic indicators table where the rate is less than zero. The target query is configured to mimic the source query but pulls data from the Tableau server using a function called 'tableau report'. This function requires the report name and visualization name from the Tableau instance, which the speaker extracts from the Tableau URL and the edit button in Tableau, respectively. The purpose is to validate the data from the backend database against the data rendered in the Tableau report.

05:03

πŸ” Analyzing Query Results and Discrepancies

After setting up the query pair in QuerySurge, the speaker saves the changes and proceeds to run the query. The process involves making requests to both the data mart and the Tableau server, pulling data from each, and then validating and comparing the two result sets. The outcome shows 12 records returned from both the source and target, indicating 12 years with negative inflation rates. However, there is one failure noted in the validation process. To investigate, the speaker views the query results and analyzes the failure by comparing the source and target results side by side. They discover a discrepancy for the year 1938 where the backend system expects an inflation rate of around 9%, but the Tableau report displays only 2%. The speaker verifies this discrepancy by checking the report for the year 1938, confirming the issue. The final step suggested is to report this discrepancy to the development team for further investigation. This demonstrates the use of QuerySurge to validate and ensure the accuracy of content within a Tableau report.

Mindmap

Keywords

πŸ’‘Query Surge

Query Surge is a data validation tool that allows users to compare data from different sources to ensure accuracy and consistency. In the video, it is used to validate the contents of a Tableau report by comparing data from a backend database with the data displayed in the report. The tool is crucial for ensuring that the visual representations of data in Tableau are accurate reflections of the underlying data.

πŸ’‘Tableau Server

Tableau Server is a platform that allows for the creation, sharing, and collaboration on data visualizations and reports. In the context of the video, the server is where the specific report being validated is hosted. The video demonstrates how to navigate to this server and access a particular report, which is central to the validation process being explained.

πŸ’‘Economic Indicators

Economic indicators are quantitative measures that provide insights into the economic performance of a country or region. In the video, the report being validated displays ESPY economic indicators, and the focus is on validating the inflation rate. The inflation rate is a key economic indicator that reflects changes in the general price level of goods and services.

πŸ’‘Inflation Rate

The inflation rate is a measure of how the general price level of goods and services in an economy changes over time. In the script, the presenter wants to validate the inflation rate for years that had a negative value, which indicates deflation. This is a critical step in ensuring the accuracy of economic data presented in the Tableau report.

πŸ’‘Data Visualization

Data visualization refers to the graphical representation of information and data. In the video, the Tableau report contains a visualization that displays economic indicators, including the inflation rate, which is represented by red bars. The visual representation is essential for quickly understanding complex data, and the video aims to ensure that these visuals accurately reflect the data.

πŸ’‘Query Pair

A query pair in Query Surge consists of a source query and a target query. The source query connects to the data source (e.g., a database) to retrieve the actual data, while the target query connects to the Tableau server to retrieve the data as represented in the report. The video demonstrates how to set up these queries to validate the data against the Tableau report.

πŸ’‘Data Mart

A data mart is a subject-oriented, integrated, and nonvolatile data repository used for reporting and data analysis. In the video, the source query is set up to connect to a data mart, which stores the economic indicators data. The data from the data mart is then compared with the data in the Tableau report to ensure consistency.

πŸ’‘Tableau Report Function

The Tableau Report function is a specific function used in the target query to retrieve data directly from a Tableau report. The function requires parameters such as the report name and the visualization name to accurately fetch the data. This function is key to the validation process as it allows for a direct comparison between the backend data and the report data.

πŸ’‘CAST Function

The CAST function in SQL is used to convert data from one data type to another. In the video, the CAST function is used to convert the data retrieved from the Tableau server, which is in string format, to match the data type of the backend database. This ensures that the data can be accurately compared during the validation process.

πŸ’‘Validation Discrepancy

A validation discrepancy occurs when there is a difference between the expected data and the actual data. In the video, a discrepancy is found between the backend system's expected inflation rate and the rate displayed in the Tableau report for the year 1938. Identifying and addressing such discrepancies is a critical part of ensuring data accuracy and integrity.

Highlights

Demonstration of using QuerySurge to validate Tableau report contents.

Navigation to a browser connected to a Tableau server.

Introduction of a specific report called 'Economy'.

Description of the report displaying ESPY economic indicators.

Objective to validate the inflation rate for years with negative values.

Explanation of red bars representing negative inflation rates.

Process to view the actual data behind the graph in Tableau.

Introduction to QuerySurge and the concept of query pairs.

Opening a query pair called 'Negative Inflation Rate'.

Explanation of source and target queries in QuerySurge.

Description of the source query connecting to the data mart.

Details of the target query connecting to the Tableau server.

Configuration of the Tableau report function with two parameters.

Method to obtain the report name from the Tableau instance URL.

Method to obtain the visualization name from the Tableau report.

Process of saving changes and running the query pair in QuerySurge.

Explanation of how QuerySurge validates and compares data from both queries.

Identification of a discrepancy between the database and the report for the year 1938.

Recommendation to report the discrepancy to the development team.

Transcripts

play00:00

[Music]

play00:08

[Music]

play00:12

hello everyone what I'd like to

play00:14

demonstrate for you today is how to use

play00:16

query Serge to validate the contents of

play00:19

a tableau report the first thing I'm

play00:22

going to do in order to demonstrate this

play00:24

is to navigate to a browser that's

play00:27

connecting to our tableau server and I'm

play00:31

going to bring up a specific report in

play00:33

this case called economy and you can see

play00:38

the details of this report displays the

play00:40

ESPY economic indicators and the tests

play00:43

that I'd like to create is I'd like to

play00:44

validate the inflation rate for any year

play00:47

that had a negative value so you can see

play00:51

that's represented by the red bars

play00:54

displayed on the visualization so I'd

play00:59

like to validate these values if I hover

play01:02

over you'll see the tooltip will give me

play01:04

the year and the rounded inflation rate

play01:06

if I want to see the actual data that's

play01:09

behind this graph what I can do is I can

play01:11

click the download button in tableau and

play01:13

click the data button and that will show

play01:16

you the values that are being

play01:19

represented in the graph that we're

play01:22

looking at so I'd like to compare the

play01:25

data here to the data that's being used

play01:30

to render the report from the backend

play01:33

database so to do that let's navigate

play01:38

over to query search and we're going to

play01:41

go to our query pairs folder and I'm

play01:46

going to open up the query prayer called

play01:47

negative inflation rate you'll see that

play01:50

each query pair has a source query and a

play01:53

target query the source query is set up

play01:57

to connect to our data Mart that is the

play01:59

database that stores the information

play02:01

that's being represented by the tableau

play02:04

report and you'll see it's a pretty

play02:06

basic query we have a select clause

play02:08

we're asking for the year and the

play02:11

average inflation fΓͺte value

play02:13

from the economic indicators table where

play02:16

the average inflation bait value is less

play02:18

than zero and we're going to organize

play02:21

the data by the year in a sending order

play02:24

on the target side we set up a

play02:28

connection to our tableau server you can

play02:31

review how this connection is configured

play02:33

in one of our previous videos and you

play02:37

can see the query for the tableau server

play02:40

connection looks like a standard sequel

play02:43

request we have a select clause we're

play02:46

requesting again the year of date and

play02:48

the average value but instead of

play02:51

querying it from a specific database

play02:52

table we have a function here called

play02:54

tableau report and this function has two

play02:57

parameters which we're going to show you

play02:58

how to configure in a moment we have the

play03:02

same filtering and the same sorting

play03:04

mechanism using the where and order by

play03:06

clause notice that we're using a cast

play03:09

function to take the data because the

play03:11

data coming back from tableau is always

play03:13

going to be in a string format so you

play03:14

want to cast it to match it to the

play03:16

values that are going to be represented

play03:18

against the backend database now the

play03:22

tableau report function will require two

play03:24

values it will require the information

play03:27

to know which report you're referencing

play03:29

as well as the visualization that's

play03:32

displayed on that report you can get the

play03:35

report by going to your tableau instance

play03:37

and taking the portion of the URL that

play03:41

specifies the report name so anything

play03:44

past the server it's a view in this case

play03:46

views regional economy I'm going to take

play03:50

copy that out of tableau and I'm going

play03:53

to put that into my function and the

play03:59

second parameter is the visualization

play04:02

that's being displayed on that specific

play04:04

report so in this case we want the

play04:07

visualization called SNP economic

play04:10

indicators you can get the specific

play04:12

visualization name by clicking the edit

play04:15

button in tableau and what you want is

play04:21

the corresponding sheet name that is

play04:24

displayed when you select it so you can

play04:26

see in this example

play04:27

Espie returns by decade highlights this

play04:31

graph which is what I'm looking for so

play04:32

if you right click and hit rename you

play04:36

can copy the name directly from this

play04:40

window and then I can take that and

play04:47

bring it back into our query search

play04:52

instance

play04:57

and that's pretty much it once you've

play04:59

created both queries you specified the

play05:02

information on the tableau report you

play05:04

want you'd make your Save Changes and

play05:07

then you're ready to go ahead and run

play05:11

the query pair so what the query is down

play05:13

doing is it's making a request to the

play05:15

data Mart pulling that data back

play05:17

simultaneously making a request to the

play05:19

tableau server pulling that information

play05:21

back and then validating the two results

play05:26

sets and comparing to data and what

play05:29

you'll see in this case is we had 12

play05:30

records returned both from the source

play05:32

and target which means there were 12

play05:35

years that had negative inflation rates

play05:37

and you see we had one failure so in

play05:40

order to investigate that failure we're

play05:41

gonna click the view query results

play05:43

button and I'm gonna make this a little

play05:47

bit larger so we can see it so you have

play05:50

your source results your target results

play05:52

and then you can analyze the failure by

play05:56

clicking the failures tab and I'm gonna

play05:59

click on the side-by-side view and what

play06:02

you'll see is we have an error for the

play06:05

year in 1938 the backend system is

play06:09

expecting an inflation rate of around 9%

play06:11

but the report is only displaying an

play06:14

inflation rate around 2% and of course

play06:17

we can validate that by taking a look at

play06:20

the report going to the year 1938 and

play06:24

you'll see it's only 2% so we have a

play06:27

discrepancy between the database and the

play06:29

report and of course what we'd have to

play06:31

do is take this discrepancy back to the

play06:34

development team and see if we can track

play06:35

down where there is a problem and that

play06:40

demonstrates how you can use query

play06:42

search to validate content in a tableau

play06:47

report

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Data ValidationTableau ReportsQuerySurgeInflation RateDatabase ComparisonData AnalysisVisualization CheckEconomic IndicatorsData DiscrepancyReport Accuracy