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.
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í.:
https://docs.microsoft.com/en-us/power-bi/connect-data/service-real-time-streaming
¿Qué sería la consulta sql?
@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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |