Can't delete row
Looks like the issue still exist (#12 )
ETDataExtensionRow row = new ETDataExtensionRow();
row.setDataExtensionKey("12121212-121212-1212-12121");
row.setColumn("SUBSCRIBERKEY", "[email protected]");
ETResponse<ETDataExtensionRow> res = client.delete(record);
Gettting error: Keys Not Found
Not sure what you meant by the issue still exists.
Please take a look at the sample test code here
Specially test cases: 65, 66, 69, 74. So just to clarify:
To delete row:
dataExtension.delete(dataExtensionRow)
To delete data extension:
client.delete(dataExtension)
it seems to be the same issue #90
This still does not appear to be fixed. Any update on when it will?
I haven't verified it 100% yet but it seems like it's impossible to delete rows from a data extension that has not defined a primary key. I tried various things like using the ETFilter to construct a proper expression, select all rows first and then call extension.delete(rows), delete by a string filter but non of it worked. After adding a primary key to the table (even though it's not being used in the filter itself) all of the mentioned methods worked.
For now I went with the following solution to delete specific rows
val response = sfClient.retrieve(ETDataExtension::class.java, "key='your_data_extension_key'")
val extension = response.result.`object`
var deletion = extension.delete("your_column_name=your_value")