Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sdg8481
Helper I
Helper I

SQL to Streaming Dataset

Hi, i'm hoping that you can help.

 

I've been looking for hours but have been unable to find a solution. Basically i need to be able to link a SQL Server Database to act as the source for a Streaming Dataset in PowerBI.

 

I have been able to create a streamining data and a powershell script using the provided code, but i just don't know to get the dataset to be fed from the SQL server. I'm obviously missing the main part, but very stuck, so any help would be greatly apprecated. Please see details below:

 

SLQ Database details are:

Server = '10.8.35.99'
Database = 'TEST_TEST'

Table = MyDatatable

 

The PowerBI Generated Power Shell code:

$endpoint = "MYENDPOINTURL"
$payload = @{
"Extension" =98.6
"AgentState" ="AAAAA555555"
"DateTimeLastStateChange" ="2019-03-19T12:04:42.066Z"
"ReasonCode" =98.6
"SKillGroupSkillTargetID" =98.6
"AgentName" ="AAAAA555555"
"Duration" =18
}
Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Sdg8481 ,

You can refer to following blog to know how to use powershell to extract data from sql databse:

6 methods to write PowerShell output to a SQL Server table

Notice: please do mask on sensitive data.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Sdg8481 ,

You can refer to following blog to know how to use powershell to extract data from sql databse:

6 methods to write PowerShell output to a SQL Server table

Notice: please do mask on sensitive data.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors