Error model result when some of value is missing - pmml

I have error of pmml(NYOKA) model scoring by pypmml library in Python
Result is missing when some of value of columns is missing an dgive result onlye when not missing values.
Model: lgbm, which score even of value is missing

Related

How to query based on a list of DBRef field in Spark SQL

I have a mongo database that contains a list of DBRef objects. I am converting this collection into a data frame in spark.
This gives the below error. Does anyone know how to resolve this error ??
EDIT:: Conversion to dataframe gives following error -> org.codehaus.janino.InternalCompilerException: Two non-abstract methods "public int scala.collection.TraversableOnce.size()" have the same parameter types, declaring type and return type
The error got resolved after upgrading the version of "org.codehaus.janino" to 3.0.9 (previously, I was using 3.0.8).

Postgresql push uuid field to Clickhouse data type error

I am trying to push data from PG-12 to Clickhouse via FDW extension ("clickhouse_fdw") and it gives me error:
SQL Error [HV004]: ERROR: cannot convert constant value to clickhouse
value Hint: Constant value data type: 2950
Sherlocking gave me error in uuid, excepting this field passes on to data transfer. If I cast it to text it gives error, that target field is uuid not text. I am confused. Which data type casting is appropriate here? Please advise DB gurus :) Thanks beforehands.

Azure Data Factory copy data - cannot convert 'System.String' to target type 'Microsoft.Xrm.Sdk.EntityReference'

I am trying to set a lookup field in the copy data action in Azure Data Factory.
The error I'm getting is
Failure happened on 'Sink' side. ErrorCode=UserErrorTypeConversionFail,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,
Message=,Source=,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The
attribute 'ks_supervisor' with value 'E3BEFA28-C7A6-EA11-A812-000D3A1BB8EF' cannot be converted from
original type 'System.String' to target type 'Microsoft.Xrm.Sdk.EntityReference'.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=Sy
stem.InvalidCastException,Message=Specified cast is not
valid.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=Microsoft.DataTransfer.Common.Sh
ared.HybridDeliveryException,Message=The attribute 'ks_supervisor' with value 'E3BEFA28-C7A6-EA11-A812-
000D3A1BB8EF' cannot be converted from original type 'System.String' to target type
'Microsoft.Xrm.Sdk.EntityReference'.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=Sy
stem.InvalidCastException,Message=Specified cast is not
valid.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,
The key piece is value 'E3BEFA28-C7A6-EA11-A812-000D3A1BB8EF' cannot be converted from
original type 'System.String' to target type 'Microsoft.Xrm.Sdk.EntityReference'.
My question is how do I set a lookup field value in D365/CDS/CRM if it is expecting a value of type EntityReference?
I have tried the CDS connector, Dynamics 365, and the CRM connector, but all result in an identical error. I have also looked for ways to try converting the source value from a string to a GUID, but I can't find a way and I don't know if that will help since it is a GUID not EntityReference. The source column is from a SQL table of type "uniqueidentifier", but it is projecting automatically to a string.
I had to add "#EntityReference" to the destination column name in the column mappings. See the answer provided by MSFT here: https://learn.microsoft.com/en-us/answers/questions/34069/azure-data-factory-copy-data-to-cds-cannot-convert.html?childToView=34732#comment-34732
See the documentation for setting lookup column values here. It also shows how to set a customer column value: https://learn.microsoft.com/en-us/azure/data-factory/connector-dynamics-crm-office-365#writing-data-to-lookup-field

Creating Calculated Fields in Google Datastudio

I would like to create categories based on a count of variable.
CASE
WHEN COUNT(variable) = 1 THEN "1"
WHEN COUNT(variable) = 2 THEN "2"
WHEN COUNT(variable) = 3 THEN "3"
WHEN COUNT(variable) = 4 THEN "4"
WHEN COUNT(variable) >= 5 THEN ">5"
END
I get an error that says that my formula is not valid. However, I cannot see where the mistake is and Google does not offer help in this regard.
This takes a little getting used to in Data Studio, but you can't use all functions inside of a CASE statement (as noted in the documentation).
Here's how you can work around this limitation:
Create a new calculated field with the value of COUNT(variable)
Set the new field's aggregation type to Sum in the field list
Then create your CASE statement formula referencing that new field
If you don't want this extra field showing up in reports, you can disable it in the data source (it can still be used by your other formula).
Also note that the input of COUNT itself cannot be an aggregate value (e.g. result of SUM or a metric with the aggregation type set).
This is an incredibly frustrating bit of Data Studio, as you end up with a lot of these fields floating around and it adds an extra step. The unhelpful error message definitely doesn't help either.

xx' property on 'yyy could not be set to a 'String' value. You must set this property to a non-null value of type 'Int32'

I am facing this problem due to unknown reason and I have tried every forum and blog for solving this but could not get any satisfactory answer for this.
Let me describe the scenario.
I have a view in database which is consisting columns from two tables. None of the tables have any column with data type "int" hence the resultant view (let's name is "MyRecord") also does not have any column with "int" data types. All the columns in the view have varchar as datatype.
Now, in my .edmx I am adding this view and the model is created (with name "MyRecord") fine with all the properties are created fine with datatype "String". I am using Silverlight with RIA services, to after builing the application related proxies are also created fine without any confiction.
The problem starts when I try to query the "MyRecord" using my domain context, I am getting following error.
Load operation failed for query 'GetMyRecords'. The 'CenterCode' property on 'MyRecord' could not be set to a 'String' value. You must set this property to a non-null value of type 'Int32'.
As seen in the error, it is clearly forcing me to convert data type of "string" column "CenterCode" to the "Int32" which is totally useless and unnecessary for me. The "String" or "varchar" columns are there because they have some business importance and changing them to "Int32" or "int" might break the application in future. Its true that "CenterCode" column has numeric data only in it but there can be character data in future thats why it is created with 'varchar' datatype.
I can not change type of my data just because EF is not supporting.
I used sql server profiler, the query is being executed correct and I can run the same query in SSMS without any error. The error comes in the application only when EF is building objects from the data returned by the query.
I am failed to understand why Entity Framework is throwing this error, it is simply not converting "varchar" to "String" and unnecessarily bringing "Int32" in picture and making the life difficult. I am struggling with this issue since last 4 hours and tried every possible way to resolve it but everything is in vein.
Please provide some information or solution on this if anyone is having it.
EF team, you must have some answer to this question or work around for this problem.
I had the same problem with a double datatype.
Solution:
Change your view/procedure and cast the column like:cast(columnname as int32)
Not sure if you solved this problem or not, but I just ran into something like this while working on multiple result sets with EF. In my case, I had reader.NextResult() that was causing a problem for me because I hadn't read all the records from the previous result and I think EF was failing due to trying to map data from the second result set into the first object.
CAST(columnName as Type) solve my problem in stored procedure.