Cannot deserialize instance of date from VALUE_STRING SSIS- Salesforce - ssis

I am creating a SSIS packahe that send information to Salesforce.
However I am getting this error:
"Cannot deserialize instance of date from VALUE_STRING value 11/10/2022 12:00:00 AM"
I think it is related to this column :
enter image description here
HoW Can i Solve this?

You need the right Salesforce DateTime format.
Read these answers maybe it will help - https://developer.salesforce.com/forums/?id=9060G000000BhO8QAK
In my case with PHP this helps.
$changed_date = date('c', '1664454080'); // "2022-09-29T12:21:20+00:00"

Related

azure data flow I cant pass json string to the sink

I'm using azure data factory to transform data, I have a derived column to process images.
iif(isNull(column1_images),
iif(isNull(column2_images),
iif(isNull(images),'N/A',toString(images))
,concat(toString(column12_images),' ','(',column2_type,')')),
concat(toString(column1_images),' ','(',column1_type,')'))
when I click on refresh buton I can see the result :
but when I pass this column to the sink I'M GETTING THIS ERROR :
Conversion from StringType to ArrayType(StructType(StructField(url,StringType,true)),false) not defined
can you tell me what is the problem please ?
The error you are getting because there is no Schema designed for the Sink. Hence, you need to use Derived column expression and create a JSON schema to convert the data. Check Building schemas using the expression builder.
You can also check this similar kind of thread for your reference.

Invalid property name: `errorType` on class `java.lang.String`. Validate that the correct setters is present

When I try to use a json-logger in Mule 4. I'm getting this error. I'm trying to log a error object here but it is not getting successfull. Please find the error object below.
I sorted out the issue. The issue was we cannot give JSON in the MESSAGE section of json-logger. When i changed it to a string. It worked
The MESSAGE section is meant to describe what you are going to Log.
It looks like you are trying to use the function stringifyNonJSON() with a Mule error and treat it like a String. Without more details of the flow and the payload it is not possible to have more insights.
You could try to create a string from the payload manually first and use that as the parameter, as the function is not able to handle this case apparently.

JSON table encountered too many errors

I have to upload a JSON load into the big query. While uploading the load I got the below-mentioned error.
I debug and found that it is failing on this JSON record which seems to be valid.
{"firebaseUid":"00FKNF7x2BQhDoPk9TSzE4Ncepn1","age_range":{"min":21},"signUpApp":"stationApp","uid":"00FKNF7x2BQhDoPk9TSzE4Ncepn1","locale":"en_US","emailSha256":"501a8456ececb2a50e733eed6c64b840d63d3aad99fb9ad4a1bbd2cbc33fc1f6","loginMethod":"facebook","notificationToken":"dummy","ageRangeMin":21,"pushNotificationEnabled":true,"projectId":"triplembaas","createDate":"13/07/2018","state":"QLD","station":"TripleM 104.5","facebookId":"1021TheHotBreakfast740157586","email":"connollyharley#gmail.com","cellularNetwork":"OPTUS","suburb":"Bellara","idfa":"60A63734A27E40249331658F1AC670A1","deviceId":"BBD901JaseJuelz454E100000000000000000","firstSignUpDate":"13/07/2018","name":"Harley Connolly","gender":"male","emailVerificationFlag":false,"lastUpdateDate":"20/07/2018","link":"dummy"}
Error while reading data, error message: JSON table encountered too many errors, giving up. Rows: 1; errors: 1. Please look into the error stream for more details.
Probably I am late but for anyone still looking for answer try this.
Change your date format to "YYYY-MM-DD". Somehow bigquery detects that the field value is Date and it won't allow any other format of date instead of "YYYY-MM-DD"

How to pass empty or null date in JSON for WCF REST Web service

We have JSON object as follows.
{
"AdvanceNotificationDays":null,
"Egos":[],
"Interests":[],
"Name":"Birthday gift for Ruchir",
"Occasion":null,
"OccasionDate":"\/Date(null)\/",
"ProfileId":null,
"UserId":4350,
"WishlistId":0,
"isShared":false
}
We try to pass this JSON object to the server and everything gets parsed except the Date. For date, the JSON parser throws the exception that says "Cannot parse null to Int64". We just want to pass empty date or null date to the server. Can anybody please help? We googled for solution to this issue, did not find an answer so far.
Why don't you just set OccasionDate to null?
try making OccasionDate of type DateTime? so the date can be null.

Entity Framework - MySQL - Datetime format issue

I have a simple table with few date fields.
Whenever I run following query:
var docs = ( from d in base.EntityDataContext.document_reviews
select d ).ToList();
I get following exception:
Unable to convert MySQL date/time value to System.DateTime.
MySql.Data.Types.MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime
The document reviews table has two date/time fields. One of them is nullable.
I have tried placing following in connection string:
Allow Zero Datetime=true;
But I am still getting exception.
Anyone with a solution?
#effkay - if you solved this it would be great if you could post the answer.
Also if anyone else has a solution that would be great too :).
Edit:
The solution can be found in the http://dev.mysql.com/doc/refman/5.1/en/connector-net-connection-options.html connector documentation.
I needed to set "Convert Zero Datetime" to true, and now it works.
hth.
You need to set Convert Zero Datetime=True in connection string of running application