Estoy usando DirectQuery en combinación con el conjunto de datos de Power BI.
He definido las directqueries en power query. Ahora, cuando obtengo el conjunto de datos de PowerBI, me enfrento a este problema
Tipo de comentarios:
Fruncir el ceño (error)
Mensaje de error:
El valor no puede ser null.
Nombre del parámetro: Origen de datos
Seguimiento de pila:
System.ArgumentNullException
en System.Windows.Forms.Control.MarshaledInvoke(Llamador de control, método Delegado, Object[] args, sincrónico booleano)
en System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
en System.Windows.Forms.WindowsFormsSynchronizationContext.Send(SendOrPostCallback d, estado del objeto)
en Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.AllowModalDialogs(Acción de acción)
en Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.LiveConnectionPropertiesValidator.TryGetValidLiveConnectionProperties(IPowerBIWindowService windowService, ILiveConnectionProperties connectionProperties, Report report, ILiveConnectionCompleter liveConnectionPropertiesCompleter, ILiveConnectionProperties& validLiveConnectionProperties, Boolean& resultIsSameConnection, ValidationStatus& validationStatus)
en Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.AreAnalysisServicesConnectionPropertiesValid(IPowerBIWindowService windowService, Report report, ILiveConnectionProperties connectionProperties, AnalysisServicesConnectionMode connectionMode, ILiveConnectionCompleter completer, ILiveConnectionProperties& validConnectionProperties)
en Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.ValidateAndCreateAnalysisServicesConnection(ILiveConnectionProperties connectionProperties, boolean addToFormulaHistory, boolean isExternalDataset)
en Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.<>c__DisplayClass24_0.<b__0>d.MoveNext()
--- Fin del seguimiento de pila desde la ubicación anterior donde se produjo la excepción ---
en System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(tarea Task)
en Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions. d__1.MoveNext()
Mensaje de seguimiento de pila:
El valor no puede ser null.
Nombre del parámetro: Origen de datos
Seguimiento de pila de invocación:
en Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
en Microsoft.Mashup.Client.UI.Shared.StackTraceInfo.. ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
en Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Excepción e)
en Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
en Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.b__0()
en Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Excepción e)
en Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
en Microsoft.PowerBI.Client.Windows.Utilities.PowerBIFormUnexpectedExceptionHandler.HandleException(Exception e)
en Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.d__1.MoveNext()
en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
en System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
en System.Threading.Tasks.Task.FinishContinuations()
en System.Threading.Tasks.Task.Finish(booleano bUserDelegateExecuted)
en System.Threading.Tasks.Task'1.TrySetException(Object exceptionObject)
en System.Runtime.CompilerServices.AsyncTaskMethodBuilder'1.SetException(excepción de excepción)
en Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.<>c__DisplayClass24_0.<b__0>d.MoveNext()
en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
en System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
en System.Threading.Tasks.Task.FinishContinuations()
en System.Threading.Tasks.Task'1.TrySetResult(TResult result)
en System.Runtime.CompilerServices.AsyncTaskMethodBuilder'1.SetResult(resultado de TResult)
en Microsoft.PowerBI.Client.Windows.LiveConnectHelpers.PowerBIService.PowerBIServiceConnector.d__14.MoveNext()
en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
en System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
en System.Threading.Tasks.Task.FinishContinuations()
en System.Threading.Tasks.Task'1.TrySetResult(TResult result)
en System.Runtime.CompilerServices.AsyncTaskMethodBuilder'1.SetResult(resultado de TResult)
en Microsoft.PowerBI.Client.Windows.PowerBIService.Flows.AuthenticatedWebRequestor.d__5'1.MoveNext()
en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
en System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
en System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, parámetros Object[], argumentos Object[])
en System.Delegate.DynamicInvokeImpl(Object[] args)
en System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
en System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, estado del objeto)
en System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
en System.Windows.Forms.Control.InvokeMarshaledCallbacks()
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(motivo Int32, contexto ApplicationContext)
en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(motivo Int32, contexto ApplicationContext)
en System.Windows.Forms.Form.ShowDialog(propietario de IWin32Window)
en Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func'1 showModalFunction)
en Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_1.b__4()
en Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.b__0()
en Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Acción de acción)
en Microsoft.PowerBI.Client.Program.Main(String[] args)
PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.114.864.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.Services.UIBlockingService","Error":"System.ArgumentNullException","MethodDef":"AllowModalDialogs","ErrorOffset":"43"}
Registros de seguimiento de instantáneas:
C:\Users\bnxt_win_power_bi\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShotf7784200-4ceb-4e8c-8649-cf17490bfe45.zip
Modo predeterminado del modelo:
Importación
Versión del modelo:
PowerBI_V3
Registros de seguimiento de rendimiento:
C:\Users\bnxt_win_power_bi\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip
Funciones de vista previa habilitadas:
PBI_compositeModelsOverAS
PBI_enableWebView2
PBI_sparklines
PBI_scorecardVisual
PBI_fieldParametersSuperSwitch
PBI_horizontalFusion
PBI_relationshipEditPane
PBI_setLabelOnExportPdf
Funciones de vista previa deshabilitadas:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PQ_WebView2Connector
PBI_NlToDax
PBI_optimizeTabRibbon
PBI_angularRls
Opciones de DirectQuery deshabilitadas:
TreatHanaAsRelationalSource
Nube:
GlobalCloud
PowerBIUserFeedbackServices_IsReported:
Verdadero
Fórmulas:
sección Sección1;
tarjeta compartida = dejar
Source = Odbc.Query("dsn=prod_db", "select * from public.power_bi_card_dump() where updated_date>='2023-03-15 00:00:00.000';")
en
Fuente;
usuario compartido = let
Source = Odbc.Query("dsn=prod_db", "select * from public.power_bi_user_dump() where updated_date >='2023-03-15 00:00:00.000';")
en
Fuente;
Transacción compartida = LET
Source = Odbc.Query("dsn=prod_db", "select * from public.power_bi_transaction_dump() where created_date between '" & Text.From(RangeStart) & "' and '" & Text.From(RangeEnd) & "';")
en
Fuente;
compartido RangeStart = #datetime(2023, 4, 1, 0, 0, 0) meta [IsParameterQuery=true, Type="DateTime", IsParameterQueryRequired=true];
shared RangeEnd = #datetime(2023, 4, 11, 0, 0, 0) meta [IsParameterQuery=true, Type="DateTime", IsParameterQueryRequired=true];
compartido #"Archivo de muestra" = dejar
Source = Folder.Files("C:\Users\bnxt_win_power_bi\Documents\product integration\History data\card history"),
Navigation1 = Origen{0}[Contenido]
en
Navegación1;
shared Parameter1 = #"Sample File" meta [IsParameterQuery=true, BinaryIdentifier=#"Sample File", Type="Binary", IsParameterQueryRequired=true];
shared #"Transformar archivo de muestra" = let
Source = Csv.Document(Parameter1,[Delimiter=",", Columns=14, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
en
#"Encabezados promocionados";
[ FunctionQueryBinding = "{""exemplarFormulaName"":""Transform Sample File""}" ]shared #"Transform File" = let
Source = (Parámetro1 como binario) => let
Source = Csv.Document(Parameter1,[Delimiter=",", Columns=14, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
en
#"Encabezados promocionados"
en
Fuente;
compartido #"Archivo de muestra (2)" = let
Source = Folder.Files("C:\Users\bnxt_win_power_bi\Documents\product integration\History data\user history"),
Navigation1 = Origen{0}[Contenido]
en
Navegación1;
shared Parameter2 = #"Sample File (2)" meta [IsParameterQuery=true, BinaryIdentifier=#"Sample File (2)", Type="Binary", IsParameterQueryRequired=true];
shared #"Transformar archivo de muestra (2)" = let
Source = Csv.Document(Parameter2,[Delimiter=",", Columns=11, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
en
#"Encabezados promocionados";
[ FunctionQueryBinding = "{""exemplarFormulaName"":""Transform Sample File (2)""}" ]shared #"Transform File (2)" = let
Source = (Parámetro2 como binario) => let
Source = Csv.Document(Parameter2,[Delimiter=",", Columns=11, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
en
#"Encabezados promocionados"
en
Fuente;
compartido #"Archivo de muestra (3)" = let
Source = Folder.Files("C:\Users\bnxt_win_power_bi\Documents\product integration\History data\txn history"),
Navigation1 = Origen{0}[Contenido]
en
Navegación1;
shared Parameter3 = #"Sample File (3)" meta [IsParameterQuery=true, BinaryIdentifier=#"Sample File (3)", Type="Binary", IsParameterQueryRequired=true];
shared #"Transformar archivo de muestra (3)" = let
Source = Csv.Document(Parameter3,[Delimiter=",", Columns=22, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
en
#"Encabezados promocionados";
[ FunctionQueryBinding = "{""exemplarFormulaName"":""Transform Sample File (3)""}" ]shared #"Transform File (3)" = let
Source = (Parameter3 como binario) => let
Source = Csv.Document(Parameter3,[Delimiter=",", Columns=22, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
en
#"Encabezados promocionados"
en
Fuente;
compartido #"error 2021" = dejar
Source = Odbc.Query("dsn=prod_db", "SELECT * FROM public.power_bi_2021_report('" & Text.From(RangeStart) & "','" & Text.From(RangeEnd) & "')"),
#"Duplicados eliminados" = Table.Distinct(Source, {"id"}),
#"Added Custom" = Table.AddColumn(#"Removed Duplicates", "Error Reason", each if (Text.Contains([response], "api Request Failed", Comparer.OrdinalIgnoreCase)) then "API Request Failed"
else if (Text.Contains([response], "issuer bank or payment service provider declined the transaction", Comparer.OrdinalIgnoreCase)) then "Issuer Bank Declined" else if (Text.Contains([response], "instrument not found for customer", Comparer.OrdinalIgnoreCase)) then "Instrument Not Found" else if (Text.Contains([response], "card network failed to generate cryptogram for the saved instrument", Comparer.OrdinalIgnoreCase)) then "Failed to Generate Cryptogram" else if (Text.Contains([response], "Transacción no permitida al titular de la tarjeta", Comparer.OrdinalIgnoreCase)) then "Transaction not allowed to Cardholder" else if (Text.Contains([response], "network infrastructure error", Comparer.OrdinalIgnoreCase)) then "Network Infrastructure Error" else if (Text.Contains([response], "Token bin for the card network token passed in the request could not be identified", Comparer.OrdinalIgnoreCase)) then "Token Bin-Card Bin Mapping Issue" else if (Text.Contains([response], "Do not honour", Comparer.OrdinalIgnoreCase)) then "Do not honour" else if (Text.Contains([response], "Card holder name has invalid characters", Comparer.OrdinalIgnoreCase)) then "Invalid Characters in Card Name" else if (Text.Contains([response], "card_cvv", Comparer.OrdinalIgnoreCase)) then "Wrong CVV format" else if (Text.Contains([response], "Too many requests from your app", Comparer.OrdinalIgnoreCase)) then "Rate limit - Too Many Request from App" else if (Text.Contains([response], "Error interno del servidor", Comparer.OrdinalIgnoreCase)) then "Internal Server Error" else if (Text.Contains([response], "mode not enabled", Comparer.OrdinalIgnoreCase)) then "Unsupported Payment Method - Mode not enabled" else if (Text.Contains([response], "Payment has failed", Comparer.OrdinalIgnoreCase)) then "Payment has failed - API Error" else if (Text.Contains([response], "s2s_enabled", Comparer.OrdinalIgnoreCase)) then "Order Pay Feature not enabled" else null)
en
#"Añadido personalizado";