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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Transmisión en tiempo real en Powerbi

Hola

no podemos conseguir hasta la transmisión en tiempo real para trabajar. No hay datos entrando. Todos los datos provienen de powershell. Pero si tomo un informe puedo ver los datos entrando.

El powershell se ve así.:

[
{
"Buena" :98.6
}
]

https://docs.microsoft.com/en-us/power-bi/connect-data/service-real-time-streaming

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

¿Qué sería la consulta sql?

v-yuta-msft
Community Support
Community Support

@brt ,

En primer lugar, debe crear un icono de conjunto de datos de streaming personalizado y agregar el icono del conjunto de datos de streaming al icono. Copie la url del punto final, el código de powershell de ejemplo debe ser como el patrón abajo:

$dataSource = 'Server Name' 
$userName = 'Windows Name' 
$password = 'Windows Password' 
$database = 'Database Name' 
$connectionString ="Server=$dataSource;Database=$database;trusted_connection=false; user id =$userName;Password=$password;Integrated Security=False"
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
$connection.Open()
$query = 'SQL Query'
$command = $connection.CreateCommand()
$command.CommandText = $query
$dataset = $command.ExecuteReader()

$endpoint = "endpoint URL"
#push data to Power BI 
while ($dataset.Read()) {
    $payload = @{
    }
    Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))
}
$connection.Close();
$connection.Dispose();

saludos

Jimmy Tao

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors