Microsoft Fabric

4 Mins Read

Powering Your Data Insights: Integrating OpenAI with Microsoft Fabric

Voiced by Amazon Polly

In today’s data-driven world, organizations are seeking ways to harness the full potential of their data by blending powerful analytics with cutting-edge AI. Microsoft Fabric, when integrated with OpenAI, creates a compelling ecosystem that accelerates insight discovery, automates intelligence, and democratizes AI across business units. Let’s explore how this synergy works and why it matters.

Enhance Your Productivity with Microsoft Copilot

  • Effortless Integration
  • AI-Powered Assistance
Get Started Now

What is Microsoft Fabric?

Microsoft Fabric is a unified data platform that brings together data engineering, data science, real-time analytics, and business intelligence in a single SaaS offering. It’s built on top of OneLake, Microsoft’s cloud-scale data lake, and combines the best of Power BI, Azure Synapse, and Data Factory under one roof. Whether you’re an analyst using low-code interfaces or a data engineer writing PySpark code, Fabric offers integrated experiences that streamline data operations and accelerate time to insights. It’s secure, scalable, and deeply connected with the Microsoft ecosystem, making it a go-to platform for enterprises looking to modernize their data stack.

Integrating Microsoft Fabric and Azure OpenAI

By leveraging Azure OpenAI, users can enhance their data workflows with powerful AI capabilities. This integration allows for automated tasks, advanced text generation, and more, making data management and analysis more efficient and insightful.

Microsoft Fabric offers several features that can be enhanced with AI:

  • Data Cleaning: Automate the process of cleaning and preparing data for analysis.
  • Text Generation: Create reports, summaries, and content based on data insights.
  • Data Transformation: Use AI to transform and enrich data for better analysis.
  • Custom AI Applications: Build applications that leverage AI to provide insights, answer questions, and identify key information.

To integrate OpenAI with Microsoft Fabric, you can use the following libraries:

  • Azure OpenAI SDK: This library allows you to interact with OpenAI models hosted on Azure.
  • Microsoft Fabric SDK: This library provides tools to manage and interact with data within Microsoft Fabric.

How to use Azure AI services:

Pre-Built AI Models in Microsoft Fabric (Preview)
Microsoft Fabric offers pre-built AI models currently in preview mode, enabling seamless integration with Fabric authentication and capacity-based billing. These models include capabilities from Azure OpenAI, Text Analytics, and Translator services.

Bring Your Own Key (BYOK) Support
If the required functionality isn’t covered by the pre-built models, you can provision a dedicated AI resource in Azure and integrate it within Fabric. This approach allows for greater customization and control, including BYOK support, where applicable.

Microsoft Fabric integrates Azure OpenAI through the Data Science and Data Engineering experiences, with support for:

  • PySpark & notebooks using openai, azure-ai-ml, and langchain libraries.
  • Power BI and Power Query can connect with OpenAI models via Azure ML endpoints.
  • KQL (Kusto Query Language) in Real-Time Analytics supports calling REST APIs (e.g., OpenAI) using external call functions.
  • Semantic Link in Fabric simplifies the connection between structured business data (like Power BI datasets) and natural language via LLMs.

Use case using Azure Open AI for Chat completion

The below sample code provides a detailed guide on using the Azure OpenAI service with SynapseML to scale natural language tasks using Apache Spark in Microsoft Fabric

STEP1: Microsoft Fabric subscription (its preinstalled with synapse ML packages for Azure Open AI)

Code to check the packages installed

STEP2: Create a Azure Open AI service in your subscription and capture the “service name”, “deployment names” (ex:chat completion , embeddings etc). Make sure the deployment can change time to time on the updates happening.

STEP3: Create a Notebook on the fabric experience and make connections to the Azure OpenAI service created in above step

Code to connect with Azure Open AI. Key is directly hard coded and recommended to use KeyVaults for production environments.

STEP4: Creating Prompts: We will use the integrated environment to get the datasets to be used for chat completion . But for demonstration we are creating a dataset of prompts and use the OpenAICompletion object to process these prompts.

STEP5: Create an OpenAICompletion object with max tokens set to 200 and creating 3 columns with prompt, error and completion.

STEP6: Transform the dataframe with the OpenAICompletion Client

OUTPUT SAMPLE:

Similarly you can apply the Azure OpenAI for embeddings, prompt engineering for Translation or Question Answering .

Conclusion

Whether it’s summarizing massive datasets, generating real-time narratives in Power BI, or building intelligent pipelines that understand context, Azure OpenAI in Fabric empowers data teams to do more with less code and faster deployment. As Microsoft continues to expand native support and tooling, the synergy between generative AI and modern data platforms is poised to redefine how businesses derive value from data.

Become an Azure Expert in Just 2 Months with Industry-Certified Trainers

  • Career-Boosting Skills
  • Hands-on Labs
  • Flexible Learning
Enroll Now

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront Service Delivery PartnerAmazon OpenSearch Service Delivery PartnerAWS DMS Service Delivery PartnerAWS Systems Manager Service Delivery PartnerAmazon RDS Service Delivery PartnerAWS CloudFormation Service Delivery PartnerAWS ConfigAmazon EMR and many more.

WRITTEN BY G R Deeba Lakshmi

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!