Forum Discussion
Formula.Firewall Error using CSV string in (step 'Source').
- Anonymous6 years ago
Hi Anonymous,
How about add custom steps to get data from CSV file and invoke SQL connector in same query table?
For example:
let list=Csv.Document(File.Contents("xxxxxxxx")), merge="'"& Text.Combine(list,"','")&"'", Source=Sql.Database("xxxxxxx","xxxx",[Query="select xxx from xxx where code in ("&merge&")") in SourceNotice: please setting 'data privacy' to 'public' to prevent the error of cross source invoke.
Regards,
Xiaoxin Sheng
Anonymouscreate a separate list for CSV and then use that list in your SQL query, read this post if it helps.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
I took your advice and still get the same message.
See Below,
Query #1:
We start with "csvTestCodes". (This query is just the Table returned from the .csv file.)
Query #2:
We move to "listTestCodes" second. (This query we are converting, csvTestCodes into a List instead of a Table.)
Query #3:
Now that we have a list of Test Codes we convert it to a string with "TestCodesString".
Query #4
Lastly, we pass the "TestCodesString" into Query1.
Hopefully you have more advice. I've already read that blog post you attached and it's not working for me unless the steps I've followed above are wrong???
Regards
- Anonymous6 years agoNot applicable
Hi Anonymous,
How about add custom steps to get data from CSV file and invoke SQL connector in same query table?
For example:
let list=Csv.Document(File.Contents("xxxxxxxx")), merge="'"& Text.Combine(list,"','")&"'", Source=Sql.Database("xxxxxxx","xxxx",[Query="select xxx from xxx where code in ("&merge&")") in SourceNotice: please setting 'data privacy' to 'public' to prevent the error of cross source invoke.
Regards,
Xiaoxin Sheng
- Anonymous6 years agoNot applicable
Anonymous
Can you please also show me an example of the same thing but using a SQL datasource which returns just 1 database field?
Thanks!!