Skip to content

Tips

Snowflake model with DBT

In case you generate your Snowflake model with DBT, add a post hook in your model.sql in order to enable the change_tracking on created tables:

sql
{{ 
  config(post_hook="alter table {{ this }} set change_tracking = true") 
}}

Disable Tableau temporary tables

Tableau can create temporary tables for some query optimizations. Those tables can prevent Indexima to accelerate your queries, as the temporary tables can't be pre-aggregated. You can disable this Tableau feature CAP_CREATE_TEMP_TABLES in two ways:

Option 1: modify Tableau Workbooks

Edit with a text editor your Tableau workbook (twb file), and add connection-customization bloc inside each of the Snowflake connection blocs:

xml
<connection class='snowflake'> 
  <connection-customization class='snowflake' enabled='true' version='10.0'>
    <vendor name='snowflake' />
    <driver name='snowflake' />
    <customizations>
      <customization name='CAP_CREATE_TEMP_TABLES' value='no'/>
    </customizations>
  </connection-customization>            
</connection>

Option 2: customize the Datasource globally

You can use a TDC file to customize the connection to Snowflake.

  • Create a file snowflake_no_tmp_table.tdc:
xml
<?xml version='1.0' encoding='utf-8' ?>
<connection-customization class='snowflake' enabled='true' version='10.0'>
  <vendor name='snowflake'/>
  <driver name='snowflake'/>
  <customizations>
		<customization name='CAP_CREATE_TEMP_TABLES' value='no'/>
  </customizations>
</connection-customization>