FuelSDK-Java icon indicating copy to clipboard operation
FuelSDK-Java copied to clipboard

Can't delete row

Open matrostik opened this issue 8 years ago • 4 comments

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

matrostik avatar Dec 14 '17 13:12 matrostik

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)

sharif26 avatar Jan 30 '18 16:01 sharif26

it seems to be the same issue #90

azkumar avatar Jun 09 '19 08:06 azkumar

This still does not appear to be fixed. Any update on when it will?

dolson334 avatar Sep 03 '19 20:09 dolson334

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")

dfreudenberger avatar Jul 18 '20 16:07 dfreudenberger