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
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
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.