class_docstr: The snowflake implementation for a DataWarehouseInferenceContextProvider.
docstr: Get the correspondent InferenceColumnType from Snowflake's returned type string.
  
  See for reference: https://docs.snowflake.com/en/sql-reference/sql/show-columns.html
  For string types: https://docs.snowflake.com/en/sql-reference/data-types-text.html#data-types-for-text-strings
docstr_tok: ["Get","the","correspondent","InferenceColumnType","from","Snowflake","'s","returned","type","string",".","See","for","reference",":","https",":","\/\/docs.snowflake.com\/en\/sql-reference\/sql\/show-columns.html","For","string","types",":","https",":","\/\/docs.snowflake.com\/en\/sql-reference\/data-types-text.html","#","data-types-for-text-strings"]
code: def _column_type_from_show_columns_data_type(
      self, type_str: str
  ) -> InferenceColumnType:
      """Get the correspondent InferenceColumnType from Snowflake's returned type string.
  
      See for reference: https://docs.snowflake.com/en/sql-reference/sql/show-columns.html
      For string types: https://docs.snowflake.com/en/sql-reference/data-types-text.html#data-types-for-text-strings
      """
      type_str = type_str.upper()
      type_mapping = {
          "FIXED": InferenceColumnType.INTEGER,
          "REAL": InferenceColumnType.FLOAT,
          "BOOLEAN": InferenceColumnType.BOOLEAN,
          "DATE": InferenceColumnType.DATETIME,
          "TIMESTAMP_TZ": InferenceColumnType.DATETIME,
          "TIMESTAMP_LTZ": InferenceColumnType.DATETIME,
          "TIMESTAMP_NTZ": InferenceColumnType.DATETIME,
      }
      string_prefixes = {
          "VARCHAR",
          "CHAR",
          "CHARACTER",
          "NCHAR",
          "STRING",
          "TEXT",
          "NVARCHAR",
          "NVARCHAR2",
          "CHAR VARYING",
          "NCHAR VARYING",
      }
  
      if type_str in type_mapping:
          return type_mapping[type_str]
  
      # This might be a string type, which can either be something like "TEXT" or "VARCHAR(256)"
      for prefix in string_prefixes:
          if type_str.startswith(prefix):
              return InferenceColumnType.STRING
  
      return InferenceColumnType.UNKNOWN
  
file_path: metricflow/metricflow/inference/context/snowflake.py
imports: from __future__ import annotations
  import json
  from metricflow.dataflow.sql_column import SqlColumn
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.inference.context.data_warehouse import ColumnProperties, DataWarehouseInferenceContextProvider, InferenceColumnType, TableProperties
label_desc: Use image node_id 1 for calling the SnowflakeInferenceContextProvider obj's underlying member method code with example usage: obj._column_type_from_show_columns_data_type(type_str) and returns: InferenceColumnType, type_mapping, InferenceColumnType