1 Reply Latest reply on Sep 6, 2018 9:56 PM by Ken Flerlage

    Aggregated Extracts Impact on the database ( convert SQL to aggregate or Aggregate at Tableau Server )

    Anthony Liu

      I'm after the mechanism of how Tableau create aggregated extracts for a datasource where the aggregation can be done at source like SQL Server, Red shift & Google Big Query.

       

      Assume

      we are sourcing the data from an order table which has order_datetime , value_of_order and other fields.

      we only want order_datetime aggregated at day level and sum of ( value_of_order )

       

      Will it

       

      1. Convert the datasource into an aggregated SQL below which is efficient.
        1. select cast (order_datetime as date) as order, sum(value_of_order) as value_of_order from order group by 1
      2. Obtain the raw datasource as it is and to the aggregation with Tableau Engine which is not efficient.
        1. so either one of the following SQL
          1. select * from orders
          2. select order_datetime , value_of_order from order
        2. aggregate the data in Tableau server

       

      If tableu is doing option 2 I will need to change the datasource to be a custom SQL that aggregates the data first. essentially put the sql I listed in 1.1