2 Replies Latest reply on Dec 19, 2016 9:38 PM by Mahfooj Khan

    Data Blending

    Sahithya Reddy

      Hi,

       

      I am having Oracle data source having 3 columns like Division Code, Department Code, Subdepartment Code.

      I am having excel spreadsheet having Function Code either of these 3 Codes (Division,Department, subdepartment). I need to do data blending between these 2 data sources. But for data blending there needs to be common field. How can I achieve.

       

      Thanks,

      Sahithya

        • 1. Re: Data Blending
          Mahfooj Khan

          Hi Sahithya,

           

          You've to transpose your Oracle table columns into rows. Find my appraoch

          Option 1: At database level create a system view to transpose

          CREATE OR REPLACE FORCE VIEW VIEW_NAME

          AS

          SELECT 'DIVISION' AS SOURCE, DIVISION AS FUNCTION_CODE FROM TABLE

          UNION

          SELECT 'DEPARTMENT', DEPARTMENT FROM TABLE

          UNION

          SELECT 'SUBDEPARTMENT', SUBDEPARTMENT FROM TABLE

           

          If your query on the above view then you'll get a result set like this

          Now connect this view (VIEW_NAME) in tableau and blend with your excel source with FUNCTION_CODE common column.

           

          Option 2: You can use custom SQL union in tableau If you don't want to create any view at database level.

          First connect your oracle table in tableau. Use custom sql and write below mentioned query.

           

          select 'DIVISION' AS SOURCE,DIVISION AS FUNCTION_CODE FROM TEMP_TABLE

          UNION

          select 'DEPARTMENT' ,DEPARTMENT FROM TEMP_TABLE

          UNION

          select 'SUBDEPARTMENT',SUBDEPARTMENT FROM TEMP_TABLE

          Then add your excel source and blend with FUNCTION_CODE.

           

          After blending you can get this

           

          Let me know If this help.

           

          Mahfooj

          1 of 1 people found this helpful
          • 2. Re: Data Blending
            Mahfooj Khan

            If my solution helped you then kindly close the thread by marking my answer as correct. So that it may help others who've similar query.

             

            Mahfooj