Forum Discussion
Tengmin123
5 years agoFrequent Visitor
query cassandra database in report builder
DavisBI Hi, I'm using report builder to generate a report and my data source is cassandra database in shared data source in pbi report server. At first, when I create a data set, my query is: s...
DavisBI
Solution Specialist
5 years agoHi, Tengmin123 ,
You can create a function (as shown in the figure below) that can split your PARAMETER from LIST to ('a','b',...) in SQL Server DB then you can using the query like below:
--Create a function, for example: [PBI_REPORT_BUILDER_SPLIT_PARAM]
CHANGE:
select * from table where user_id in (@user_id)
TO:
select * from table
where user_id in
(SELECT [ITEM] FROM [PBI_REPORT_BUILDER_SPLIT_PARAM](@user_id,","))
Otherwise, you will get the error as your mention (Error while executing a query...).
Mark this answer as a solution if this helps, thanks!
- Tengmin1235 years agoFrequent Visitor
Hi, Davis. Thank you for your reply. I'm using Cassandra database instead of SQL database. I cannot create this function in db.