sql-bi / Pbi-PushDataset

Validate and translate regular Tabular models in Push Datasets, also providing helper functions to clear, populate, and simulate real-time transactions.
MIT License
49 stars 15 forks source link

Operation returned an invalid status code 'Badrequest' #10

Open Ypf485 opened 2 years ago

Ypf485 commented 2 years ago

I followed all the documentation of Installing the tool and also created app on AAD with following the instruction on how to build Service Principal application to use Power BI services can you give me more insights. Please and Thank you.

Ypf485 commented 2 years ago

badrequest

marcosqlbi commented 2 years ago

There could be several reasons:

Ypf485 commented 2 years ago

Thanks for the reply I have tested the model in C# using the other tools and overnight i was able to find why i am getting the error so that is solve

Ypf485 commented 2 years ago

But i am also facing problem in update-PublishDataset could you explain what -READFROMWROKSPACE means?

marcosqlbi commented 2 years ago

It is a parameter that specifies from which dataset to extract the data for the initial population of the real-time dataset.

nkuppili commented 2 years ago

@Ypf485 are you able figure out the solution? I am facing same issue with my model

@marcosqlbi

** PUBLISH model ** Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. (Operation returned an invalid status code 'BadRequest') ---> Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'BadRequest' at Microsoft.PowerBI.Api.DatasetsOperations.PostDatasetInGroupWithHttpMessagesAsync(Guid groupId, CreateDatasetRequest dataset, Nullable1 defaultRetentionPolicy, Dictionary2 customHeaders, CancellationToken cancellationToken) at Microsoft.PowerBI.Api.DatasetsOperationsExtensions.PostDatasetInGroupAsync(IDatasetsOperations operations, Guid groupId, CreateDatasetRequest dataset, Nullable1 defaultRetentionPolicy, CancellationToken cancellationToken) at Sqlbi.PbiPushDataset.PbiConnection.CreatePushDataset(FileInfo model, Guid groupId, String datasetName, Boolean overwriteExistingDataset, Boolean fifoPolicy, Action1 unsupportedMeasureAction, Action1 unsupportedRelationshipAction) in C:\Users\MarcoRusso\source\repos\Pbi-PushDataset\Sqlbi.PbiPushDataset\PbiConnection.cs:line 280 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Sqlbi.PbiPushTools.CommandLine.Publish(FileInfo model, String principal, String secret, String tenant, String group, String datasetName, String datasetId) in C:\Users\MarcoRusso\source\repos\Pbi-PushDataset\PbiPushTools\CommandLine.cs:line 42 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Delegate.DynamicInvoke(Object[] args) at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>cDisplayClass4_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass23_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass16_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass27_0.<b1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass25_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b24_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass22_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass11_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b10_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext()`

marcosqlbi commented 2 years ago

@nkuppili your error seems different, do you have relationships like many-to-many or bidirectional filters? There seems to be an error about an unsupported relationship type.

nkuppili commented 2 years ago

@nkuppili your error seems different, do you have relationships like many-to-many or bidirectional filters? There seems to be an error about an unsupported relationship type.

Yes we had both directions, Let me change to "One Directional" relation and try again. I will keep you posted.

hoanghce commented 1 year ago

Cannot install it

marcosqlbi commented 1 year ago

@hoanghce can you provide more details?