Skip to content

PowerBI Desktop - Direct Query - Slicer - Search is not working - DB::Exception: Syntax error #19

Closed
@areshayevcaci

Description

@areshayevcaci

Describe the bug
PowerBI Desktop, Direct Query, Slicer - try to Search "Test" - DB::Exception: Syntax error

To Reproduce
Steps to reproduce the behavior:
1.

create table test_pbi_slicer_search (code String not null) Engine = MergeTree() order by (code);
insert into test_pbi_slicer_search values ('test_01'),('test_02'),('test_03'),('test_04'),('test_05');

  1. PowerBI Desktop, standard Slicer, try to search "test"

  2. ERROR: see screenshot

  3. Exception in Logs

(version 24.1.2.5 (official build))
2024.02.16 11:42:50.431448 [ 1173 ]  
<Error> executeQuery: Code: 62. DB::Exception: Syntax error: failed at position 101 ('locate') (line 6, col 16): locate({odbc_positional_1:LowCardinality(String)}
,(case^M
        when `code` is not null^M
        then `code`^M
        else {odbc_positional_2:LowCardinality(S. Expected colon between name and type. (SYNTAX_ERROR) 
(version 24.1.2.5 (official build))  
(in query: select `code` from ( select `code` from `dev`.`test_pbi_slicer_search` where { fn locate({odbc_positional_1:LowCardinality(String)}, (case when `code` is not null then `code` else {odbc_positional_2:LowCardinality(String)} end), {odbc_positional_3:Nullable(Int32)}) } >= {odbc_positional_4:Nullable(Int32)} ) as `ITBL` group by `code` order by `code` limit 101), Stack trace (when copying this message, always include the lines below):

  1. QUERY from logs
select `code` from ( 
select `code` from `dev`.`test_pbi_slicer_search` 
	where { fn locate(
					{odbc_positional_1:LowCardinality(String)}
				   ,(case when `code` is not null then `code` else {odbc_positional_2:LowCardinality(String)} end)
				   ,{odbc_positional_3:Nullable(Int32)}) } 
		>= {odbc_positional_4:Nullable(Int32)} 
	) as `ITBL` group by `code` order by `code` limit 101

Screenshots
image
image

Configuration

Environment

  • PowerBI version: MS PowerBI Desktop. Version: 2.124.2028.0 64-bit (December 2023)
  • power-bi-clickhouse version: v0.1.2-beta
  • ClickHouse ODBC driver version: 1.2.1.20220905
  • ClickHouse: 24.1.2.5
  • Operating system: Microsoft Windows [Version 10.0.19045.3930]; Ubuntu 20.04.5 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions