3 Replies Latest reply on Aug 3, 2016 9:50 AM by John Sobczak

    Data blending

    Cuong Tran

      Hi

      I am trying to do some data blending in Tableau from two different MYSQL databases

      In the first data base I have the following two tables

      Names

      NameID

      First

      Last

      Full Name

      Phone

      1

      Mike

      Frank

      Mike Frank

      123456789

      2

      Joe

      Williams

      Joe Williams

      474125896

       

       

       

       

       

       

      Scores (earned degrees and time when it was earned)

      ScoreID

      NameID

      Class        

      Score

      DateTime(YYYY-mm-dd)

      1

      1

      Math

      50

      2011-01-01 12:00:00

      2

      1

      English

      60

      2011-01-04 15:42:00

      3

      1

      Science

      80

      2011-02-01 14:00:59

      4

      2

      Math

      60

      2012-06-08 07:50:56

      5

      2

      English

      40

      2012-06-10 07:20:40

      6

      2

      Science

      50

      2012-06-15 08:00:20

       

      In Names Tables the Full Name field is unique, also the scores table is using the NameId as foreign key to Names Table

      I created my view from this table

      In the second database

      I have the following Table

      Names

      NameID

      First

      Last

      Full Name

      Phone

      1

      Mike

      Frank

      Mike Frank

      123456789

      2

      Francis

      Mark

      Francis Mark

      564789123

      3

      David

      Bost

      David Bost

      541852416

      4

      Joe

      Williams

      Joe Williams

      474125896

       

      Country (represent countries each person traveled to and time when they arrive to the country)

      CountryID

      NameID

      Country Name

      DateTime (YYYY-mm-dd)

      1

      1

      Japan

      2011-01-02 08:00:00

      2

      1

      USA

      2011-01-05 11:42:00

      3

      1

      France

      2012-02-02 12:00:59

      4

      4

      Japan

      2012-06-08 09:50:56

      5

      4

      Germany

      2012-06-11 07:20:40

      6

      4

      Italy

      2012-06-20 08:00:20

       

      In Names Tables the Full Name field is unique, also the country  table is using the NameId as foreign key to Names Table

      Joe Williams now has NameId = 4

      I would like to create a graph and add the county as details so when I hove over a score I can tell what county the person was in when he earned the degree

      Is this possible?

      What I was trying to do is connect country table to Name table (in the 2nd DB) using NameId then connect Name table from ( 2nd DB ) to Name table from (1st DB) using Full Name Field. And the Name table (1st DB) to Scores table using NameID

      Date and time in Scores and Country tables do not really match so maybe I can assume that a person earned a degree from latest country he was in.

        • 1. Re: Data blending
          khalid norat

          What is the issue you are having when trying to achieve this.

           

          you should easily be able to blend 2 datasources together using the name ID.

           

          If you having any difficulty doing so

           

          please create a sample workbook with the 2 datasources(or something that replicates the 2 datasources) and I can help you achieve this

          • 2. Re: Data blending
            Cuong Tran

            please view the attachment above

            • 3. Re: Data blending
              John Sobczak

              One fundamental drawback in blending is that you cannot get any dimensional granularity beyond what is in the primary data source, so that in essence is why you cannot get country from the secondary data source.

               

              If you wait a week or 2 when Tableau 10 comes out you can join all these together (through cross database joins) as one data source.

              2 of 2 people found this helpful