KNOWLEDGE BASE

Snowflake Measures Not Appearing in View


Published: 04 Jul 2018
Last Modified Date: 29 Aug 2019

Issue

When some measures from a Snowflake data source are added to a view in Tableau Desktop, the values for these measures may not appear. The underlying data may show values or it may show Null.

Environment

  • Tableau Desktop
  • Snowflake

Resolution

Option 1

  1. Open the affected workbook in Tableau Desktop.
  2. Select the Data Source tab.
  3. Right-click the Snowflake connection on the left panel and select Initial SQL....
  4. In the Initial SQL dialog box, enter the following statement:
    ALTER SESSION SET QUOTED_IDENTIFIERS_IGNORE_CASE = FALSE
  5. Click OK.

Option 2

Alternatively, work with your Snowflake administrator to set the QUOTED_IDENTIFIERS_IGNORE_CASE parameter to FALSE globally for the data source.

Cause

Tableau uses double quotes for identifiers in the underlying SQL queries, which means we initially store field names as case sensitive, for example "FieldName"

If QUOTED_IDENTIFIERS_IGNORE_CASE is set to TRUE then additional queries to the Snowflake database will return the field names as all upper case, for example "FIELDNAME". Because the session parameter does not affect the initial metadata gathering, this will result in a mis-match.
 

Additional Information

Note on Option 1:

Some Snowflake databases require that variables are set at the beginning of a session. If editing the existing connection to include the initial SQL does not resolve the issue, then do the following in the affected workbook:
  1. Create a new connection to the same Snowflake database
  2. In the first connection dialog, click Initial SQL...
  3. In the Initial SQL dialog box, enter the following statement:
    ALTER SESSION SET QUOTED_IDENTIFIERS_IGNORE_CASE = FALSE
  4. In the Data Source tab, connect to the Snowflake tables as normal
  5. Navigate to a worksheet
  6. Navigate to Data > Replace Data Source...
  7. Replace the original data source with the new data source


Discuss this article... Feedback Forum
Did this article resolve the issue?