We use custom SQL mostly, because we usually want to limit the rows or columns or use Oracle functions like Max() or Listagg(). Also we have nested selects inside joins and unions so the Tableau joins are not really usable. We normally do a complex query in Tableau rather than creating a materialized view because it is easier to quickly make changes without getting our DB admins involved.
Awesome thanks! Do you prefix your column names with where the data came from? Maybe I am bringing back too many columns (45) but it seems hard to find fields when they are just listed alphabetically. Like I have "dates" related fields (period, year, week, start and end dates, etc), "store" related fields (division, region they belong to and names), as employee information (manager name, etc).
I guess this is just personal preference but I am the DBA here and just make the extracts for others to use as I am not really using them so I want to make it convenient for them and curious what others do. Thanks.
We prefix column names with a code representing the data source. This has the added benefit of eliminating the need to use aliases in the SQL since no column names will be duplicated across tables. (Unfortunately, we have a couple of exceptions to this for historical reasons.)