How to Convert Binary Data From Database to Power BI

In Power BI, you can convert binary data from a database, by extracting the binary data from the database, converting it to a text format, and then applying it in your visualizations and reports as needed.

However, the specific steps involved will depend on the type of binary data you are working with and the format in which it is stored in the database.

In this article, I will walk you through a step-by-step guide on how to convert binary data from a database to Power BI.

Read to learn more.

Introduction: How to Convert Binary Data From Database to Power BI

To convert binary data from a database to Power BI, you can follow these general steps:

Connect to the database

To start with, connect to the database that contains the binary data to retrieve the data from the database. This will depend on the type of database you are using (e.g. SQL Server, MySQL, Oracle, etc).

To connect to the database, use the Get Data feature in the Home tab.

Load the data into Power BI

Once you have connected to the database, select the table that contains the binary data and load the data into Power BI. Use any of the data sources that support the converted data format (e.g. Excel, CSV, or text file).

The specific steps required will depend on the type of binary data you are working with such as strings, images, videos, audio files, and other types of multimedia content.

In this article, I will explain converting image or file data, strings, and audio files.

Converting image or file data from a database

The first thing to do is to retrieve the binary data for the image or file from the database. Then convert the data to a file format, such as JPEG, PNG, or PDF.

Save the converted file to a location that can be accessed by Power BI, such as a local drive or a network share. Load the file into Power BI using the Get Data option and select the right data source.

Converting string data from a database

Retrieve the binary data for the string from the database. Then convert the binary data to a string format that Power BI can read, such as UTF-8 or ASCII.

Save the converted string to a text file, and load the text file into Power BI using the Get Data option. Select the appropriate data source (e.g. “Text/CSV”).

Select the text file you saved the data with and follow the prompts to configure the data loading options.

Converting audio from a database

To start with, extract the audio files from the database, and convert them to a compatible format such as MP3, WAV, and M4A. Then upload the audio files to a storage location such as OneDrive or SharePoint.

After this, add the audio files to your Power BI report. To do this, you can use the Media visual by going to the Visualizations pane and selecting Media. Then, drag the Media visual onto your report canvas.

In the Media visual settings, you will need to configure the source of the audio file. You can also choose to autoplay the audio file when you open the report. After this, save and publish the report.

NB: Including audio files in your Power BI report can increase the file size and may affect performance. So, be sure to optimize your report and consider the file size and format of the audio files you use.

FAQs: How to Convert Binary Data From Database to Power BI

What databases support binary data?

Most relational databases, such as MySQL, SQL Server, Oracle, and PostgreSQL, support binary data.

Can you display images stored as binary data in Power BI?

Yes, you can.

You will need to convert the binary data to an image format, such as JPEG or PNG, using Power Query. You can then use the “Image URL” visual in Power BI to display the image.

Conclusion: How to Convert Binary Data From Database to Power BI

Yes, that is how to convert binary data from a database to Power BI.

Now, you can use this converted binary data in your visualizations and reports as needed.

NB: the key is to first convert the binary data to a format that can be read by Power BI and then load that converted data into Power BI using one of the supported data sources.

I hope you enjoyed reading this article.

Thanks for reading!