Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleted events only captured as regular updates #35

Open
aiguofer opened this issue Jun 20, 2019 · 0 comments
Open

Deleted events only captured as regular updates #35

aiguofer opened this issue Jun 20, 2019 · 0 comments

Comments

@aiguofer
Copy link
Contributor

Currently, when an object is deleted and there is a deleted event created, that is picked up as a regular update by the tap. There is nothing actually letting consumers know that the object was deleted.

These are the objects that receive a deleted event:

account.external_account.deleted
coupon.deleted
customer.deleted
customer.discount.deleted
customer.source.deleted
customer.subscription.deleted
customer.tax_id.deleted
invoice.deleted
invoiceitem.deleted
person.deleted
plan.deleted
product.deleted
recipient.deleted
sku.deleted

and I believe the ones that currently get picked up by the tap are:

coupon.deleted
customer.deleted
customer.subscription.deleted
invoice.deleted
invoiceitem.deleted
product.deleted

To see exactly what was happening, I deleted a test product, and this is what was returned by the tap:

{
  "stream": "products",
  "time_extracted": "2019-06-20T01:05:28.419362Z",
  "type": "RECORD",
  "record": {
    "name": "gmlBnzuf9S4yz2gxt42JdT",
    "active": false,
    "metadata": null,
    "shippable": true,
    "object": "product",
    "deactivate_on": [],
    "type": "good",
    "images": [
      "http://www.FqjTey3L2JlNyyQnK.com/image.png",
      "http://www.n2eLOF3A.com/image.png"
    ],
    "caption": "Ct4a4GdBMXVima2DCFX",
    "created": "2018-10-11T18:29:22.000000Z",
    "url": "http://www.yltxx39.com",
    "id": "prod_DlgHSkf4aaonpB",
    "description": "pj7sLU",
    "package_dimensions": null,
    "updated": "2019-06-20T01:05:02.000000Z",
    "livemode": false,
    "attributes": []
  }
}

Based on https://www.stitchdata.com/docs/replication/deleted-record-handling, maybe the tap could be creating a soft_delete field that lets consumers know that the object got deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant