2 Replies Latest reply on Nov 28, 2012 5:44 PM by Robert Morton

    Tableau use SqlColumns for getting metadata

    Rajat Jain

      I am developing an ODBC driver which will work with Tableau -- I have the following question.

       

      When I start to connect to my DSN, I select my driver, then click connect. The connection happens and then when I search for a table and click OK, it issues a few queries to get the table metadata. Here are some of those queries:

       

      select * from `default`.`<table_name>` limit 1

      select top 1 * from `default`.`<table_name>`

      select * from (select `col` from (select 1 as `col`) as `checktop`) where rownum <= 1

      select `col` from (select 1 as `col`) as `checktop` limit 1

      etc.

       

      I don't want Tableau to use all these queries to fetch table metadata, when there is a more efficient way to just call the SqlColumns API to fetch the metadata. Can Tableau be configured to use the same? I have tried a few configuration options but they don't seem to work. Here's my internal.tdc file.

       

      <?xml version='1.0' encoding='utf-8' ?>

      <connection-customization class='genericodbc' enabled='true' version='8.0'>

        <vendor name='<vendor_name>' />

        <driver name='<driver_name>' />

        <customizations>

          <customization name='CAP_SUPPRESS_DISCOVERY_QUERIES' value='yes' />

          <customization name='CAP_ODBC_METADATA_SUPPRESS_PREPARED_QUERY' value='yes' />

          <customization name='CAP_ODBC_METADATA_SUPPRESS_EXECUTED_QUERY' value='yes' />

          <customization name='CAP_ODBC_BIND_SUPPRESS_PREFERRED_TYPES' value='yes' />

          <customization name='CAP_ODBC_METADATA_SUPPRESS_SQLCOLUMNS_API' value='no' />

          <customization name='CAP_ODBC_USE_NATIVE_PROTOCOL' value='yes' />

        </customizations>

      </connection-customization>