Forum Discussion

MNMKJ's avatar
MNMKJ
Frequent Visitor
2 years ago

Filter of data while importing from sql

Hey Guys, 

Need help with below:

 

I have a huge data set in hadoop which i have connected with power bi.

I also have another table in excel which contains list of customers i need to filter and take out details from the main table in sql.

i converted the table in list and made a parameter named "kadam"

 

and used below query :

 

let
Source = #!"Odbc.Query(""dsn=impala"", ""SELECT * FROM analytics_n_reporting.v_lpm_smth_liab_consld_acct_details WHERE cod_cust_id IN (""kadam""))"
in
Source

 

 

it is giving error " Expression.SyntaxError: Token ',' expected."

 

Please help here, ultimately i need to use the table from excel to filter data while importing from hadoop, i dont want to use merge as it will take a lot of time and not using relationship either as i need to do further conditional analysis in power query.

2 Replies

  • MNMKJ , I think it should be like

     

    let
    Source = Odbc.Query("dsn=impala", "SELECT * FROM analytics_n_reporting.v_lpm_smth_liab_consld_acct_details WHERE cod_cust_id IN ('kadam')" )
    in
    Source

    • MNMKJ's avatar
      MNMKJ
      Frequent Visitor

      Hey, it is not working as single quotes does not takes parameters. please help here