Devran Uluçay
2020-03-31 12:32:34 UTC
Hello,
Normally in my project, I was parsing the json data returned as a result of web service to the csv file, now they want me to add it to the database, not csv. For this, I use JDBC connector in addonly mode but I cannot add data.
The code I wrote is as follows.
hEntry = work.fromJSON(work.Response);
jsObj = fromJson(hEntry.toJSON());
entry = system.newEntry();
for (i = 0; i < jsObj.resources.length; i++) {
schema = jsObj.resources[i];
entry.removeAllAttributes();
entry.id = schema.id;
atts = schema["urn:ibm:params:scim:schemas:extension:bean:agc:2.0:Entitlement"];
entry.application_id = atts.application_id;
entry.application_name = atts.application_name;
entry.name = atts.name;
//CsvConnector.add(entry);
DBConnector.putEntry(entry);
}
How can I add this data to the database?
Thanks.
Normally in my project, I was parsing the json data returned as a result of web service to the csv file, now they want me to add it to the database, not csv. For this, I use JDBC connector in addonly mode but I cannot add data.
The code I wrote is as follows.
hEntry = work.fromJSON(work.Response);
jsObj = fromJson(hEntry.toJSON());
entry = system.newEntry();
for (i = 0; i < jsObj.resources.length; i++) {
schema = jsObj.resources[i];
entry.removeAllAttributes();
entry.id = schema.id;
atts = schema["urn:ibm:params:scim:schemas:extension:bean:agc:2.0:Entitlement"];
entry.application_id = atts.application_id;
entry.application_name = atts.application_name;
entry.name = atts.name;
//CsvConnector.add(entry);
DBConnector.putEntry(entry);
}
How can I add this data to the database?
Thanks.