Support Questions

Find answers, ask questions, and share your expertise

Unable to pass parameter to Impala from SSRS

avatar
New Contributor

I am working on a poc where I have to connect my ssrs report to fetch data from impala based on the user selection made and display it in report. To get the required data , i have created a dataset , connected it to Impala data source , and passed argument. But it is not working out.

 

sample query :

Select * from table

where user_selection=@param

 

Here 'param' is defined under parameter folder of SSRS report and also pointing in the current dataset.

also , instead of @ - I have tried :param,?param,${param},[param],[@param] and many more ... but nothing worked out.

 

Please let me know your thoughts.

 

PS : I have posted the same on SSRS forum as well.

3 REPLIES 3

avatar

Hi @Impala_issues,

  I think this is more of an SSRS question than an Impala question, although there may be people on this forum using Impala in a similar way.

 

I'm assuming that SSRS uses the Impala ODBC driver. The Impala ODBC driver supports the standard SQLBindParameter() API to subsitute ? in the query text with parameters. I have no idea if SSRS has some kind of additional parameter substitution logic on top of that.

 

References:

https://www.cloudera.com/documentation/other/connectors/impala-odbc/latest/Cloudera-ODBC-Driver-for-...

https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlbindparameter-function

 

avatar
New Contributor

Hi @Impala_issues , 

 

I'm facing the same issue here.

Have you tried other alternatives?

I also need some suggestions.

 

Many thanks!

 

avatar
New Contributor

You can use an expression incited of a query. 

RajithaF_0-1605809320380.png

 

in the expression , 

your query should be something like this. 

=" SELECT A.COL1 , A. COL2 FROM schema.tableName A WHERE A.COL1 = '" & Parameters!parameterName.Value & "'    "

 

Notice the Quotation marks besides the parameter ( " , '  ) and equal ( = ) sign at the beginning

You should create fields manually( Use query designer without parameters and let SSRS do the Refresh Fields task)