Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Accessing SQL Blobs

Hi: An ERP application stores document attachments in SQL as Blobs. Is it possible for Power BI to access attachments for those who want to open, say, PDFs in a Power BI dashboard or report? If so,...
  • lbendlin's avatar
    6 years ago

    Yes, Power Query has a "Binary" data type that you can then bend to your will, for example by declaring that you want to read that binary as a PDF.

     

    Just add the blob to your SQL view columns.

     

    Here's an example where I pull a bunch of CSV files out of their blobs (the [Content] column)  

     

     #"Invoke Custom Function1" = Table.AddColumn(#"Renamed Columns1", "CSV", each #"Get CSV file"([Content])), 

     

    via a custom function where I do some basic transforms:

     

    Get CSV File = 

     

    (File) => let
    Source = Csv.Document(File,[Delimiter=",", Encoding=1252, QuoteStyle=QuoteStyle.Csv]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),

    ....

  • Anonymous's avatar
    Anonymous
    6 years ago

    Thank you.  I apologize, for getting upset.

    How can that, at least, be done?  I cannot find any good and clear instructions on doing so.