Forum Discussion
Error Visualizing Data from __time column in Druid
- 1 year ago
Hi padiga-isw , Thank you for reaching out to the Microsoft Community Forum.
Power BI does not expect a SEARCHABLE field in the SQLColumns result, that attribute isn’t part of the standard output. Instead, it uses the SQLColAttribute call with SQL_DESC_SEARCHABLE to determine if a column supports filtering. However, in your case, even though SQLColAttribute returns SEARCHABLE = 3 for __time, Power BI still blocks folding. This means it likely treats the column as reserved or non-searchable during schema discovery, either because of the driver’s internal metadata or due to Power BI recognizing the column name (__time) as special.
The only reliable workaround is to expose a duplicate of __time under a neutral name like event_time, typed as a standard TIMESTAMP and not flagged internally as special. That column avoids reserved-name logic and will allow filters to fold properly. If you're maintaining the driver, the long-term fix is to make sure the __time column is not treated as special or non-searchable in the driver’s schema metadata, not just at runtime.
Hi v-hashadapu ,
Thank you for the detailed explanation. I have a doubt regarding SQLColumns, please correct me if I am wrong
https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolumns-function?view=sql-server-ver17
In the above link I couldn't find any SEARCHABLE property that can be set in SQLColumns, is it a custom property that needs to be added?
I have a Trino custom connector where the SQLColumn returns
```
"TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE", "TYPE_NAME", "COLUMN_SIZE", "BUFFER_LENGTH", "DECIMAL_DIGITS", "NUM_PREC_RADIX", "NULLABLE", "REMARKS", "COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", "ORDINAL_POSITION", "IS_NULLABLE", "USER_DATA_TYPE"
"tpch", "tiny", "nation", "name", -9, "varchar", 25, 25, <Null>, <Null>, 0, <Null>, <Null>, -9, <Null>, 25, 2, "NO", 0
```
Where it doesn't define any SEARCHABLE property in SQLColumns similar to Druid, but it is able to display data with Timestamp datatype
I also ran SQLColAttribute to check the SEARCHABLE property of __time column it returns 3(SQL_SEARCHABLE).
Thank you.
Hi padiga-isw , Thank you for reaching out to the Microsoft Community Forum.
Power BI does not expect a SEARCHABLE field in the SQLColumns result, that attribute isn’t part of the standard output. Instead, it uses the SQLColAttribute call with SQL_DESC_SEARCHABLE to determine if a column supports filtering. However, in your case, even though SQLColAttribute returns SEARCHABLE = 3 for __time, Power BI still blocks folding. This means it likely treats the column as reserved or non-searchable during schema discovery, either because of the driver’s internal metadata or due to Power BI recognizing the column name (__time) as special.
The only reliable workaround is to expose a duplicate of __time under a neutral name like event_time, typed as a standard TIMESTAMP and not flagged internally as special. That column avoids reserved-name logic and will allow filters to fold properly. If you're maintaining the driver, the long-term fix is to make sure the __time column is not treated as special or non-searchable in the driver’s schema metadata, not just at runtime.