• Using Stored Procedure as a Power BI Source (with parameters)

    Using a SQL Server stored procedure as a source in Power BI We might be most familiar with using a view as the source to our PBI datasets, a series of views creating a series of tables. This can be great but when handling more complex view queries with lookups, you might find yourself with a severely long refresh and even an error. This is where a stored procedure is required – this gives you more control layer by layer in the source query.…

    » Read more
  • TRY_CAST Arithmetic Overflow Error

    TRY_CAST() Arithmetic Overflow Error – How? It is expected that at some point you will receive some bad data – such as the wrong range, form or data type. Sometimes you receive valid data but the result of a calculation is when it goes wrong, a simple multiplication takes your data from good to bad, the difference between your cube processing and not processing, the difference between your clients receiving vital data and not receiving…

    » Read more
  • Synapse Script Activity Error “Argument {0} is null or empty.\r\nParameter name: paraKey”

    Came across this issue when trying to get a range of values that are calculated dynamically at runtime. Using the script activity in ADF, I wanted a result set that I could reference as parameters for a notebook later in the pipeline but was experiencing an error I had not seen before referencing null arguments. The Problem The script is simple – get a few key dates from the last few months and set these as variables. Finally, return these…

    » Read more
  • Synapse Copy Activity Fails Over Certain File Size – ADF

    Copy Activity Issue in ADF / Synapse Analytics Recently, when trying to copy a .csv file from an FTP source to a Azure Data Lake using a Copy Activity in Azure Synapse, I had an issue where files > 16MB in size would fail. To overcome this, I took the first 13k rows and created another file from this, which resulted in a 4MB file. I tested this extra small file and it worked in the copy activity no issues. I multiplied these same 13k rows out…

    » Read more
  • Exporting to a CSV file from SSMS – Simple BCP Method

    Export table contents to a CSV file from SQL Server  It may be useful to export a tables contents to a CSV file for some exploratory analysis, to feed an ETL and much more. This can be done with some simple SQL commands that exist as a stored procedure, SQL agent job or just a one off piece of code. The export can be the whole table or filtered results but one thing to keep in mind is the number of rows and result size as it may become…

    » Read more
  • Linked Server with Unique Identifier Issue

    There is currently an issue with Linked Servers when querying and filtering by a guid (uniqueidentifier). If you query a Synapse SQL pool from your on-prem SQL server, for example, and attempt to filter the results using a uniqueidentifier column, you will get the following error message: Msg 103010, Level 16, State 1, Line 1 Parse error at line: 1, column: 408: Incorrect syntax near ‘guid’. Msg 110811, Level 16, State 1, Line 1…

    » Read more