Skip to content

Deleted events only captured as regular updates #35

@aiguofer

Description

@aiguofer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions