Hi there support :slightly_smiling_face: I'm tryin...
# support
s
Hi there support 🙂 I'm trying to get my arms around RS for our team and I've got a couple questions regarding warehouse destinations. Do I understand correctly that anytime an event payload has a property where there is a corresponding column in the the warehouses schema, the value there will automatically be written?
✅ 1
h
rudder will create the column if it does not exist
s
Awesome, I understand. How about for an Array? I'm using a webhook source to try and pull in events from our mail provider SendGrid, but the properties payload is including multiple events. For example, an 'opened', 'clicked' and 'processed' email event all in one payload. Will rudder automatically split those into separate track events?
Here's a sample payload:
Copy code
{
  "anonymousId": "4f2bb4d4-b95f-42cc-a652-6d0e7b5ea813",
  "event": "webhook_source_event",
  "messageId": "15cab574-0881-48ee-b3b9-71ef40a22fcf",
  "properties": [
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "processed",
      "sg_event_id": "KuTV0YAgXZsh53G_xrLNzg==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408
    },
    {
      "attempt": "5",
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "deferred",
      "response": "400 try again later",
      "sg_event_id": "UL4NAYxjhsfZV-u29qN0ug==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408
    },
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "delivered",
      "response": "250 OK",
      "sg_event_id": "wE4a6yqjMpxBL5CgSufI7Q==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408
    },
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "open",
      "ip": "255.255.255.255",
      "sg_event_id": "C9dMoUde1L50XEhA3-vRLg==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408,
      "useragent": "Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
    },
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "click",
      "ip": "255.255.255.255",
      "sg_event_id": "PzPErGVNoG5UyRACyWrOWQ==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408,
      "url": "http://www.sendgrid.com/",
      "useragent": "Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
    },
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "bounce",
      "reason": "500 unknown recipient",
      "sg_event_id": "LgiTJudg5PrYA2lD9k-u9Q==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "status": "5.0.0",
      "timestamp": 1670430408
    },
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "dropped",
      "reason": "Bounced Address",
      "sg_event_id": "vtn0VKn4TR1Gexl2D0wdfA==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "status": "5.0.0",
      "timestamp": 1670430408
    },
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "spamreport",
      "sg_event_id": "YBcw8xU2LpGOU1SYG4qIQQ==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408
    },
    {
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "unsubscribe",
      "sg_event_id": "G_B6JXVupc9nZY-FMC02kg==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408
    },
    {
      "asm_group_id": 10,
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "group_unsubscribe",
      "ip": "255.255.255.255",
      "sg_event_id": "z671oOiEh-xekh8B-y23gA==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408,
      "url": "http://www.sendgrid.com/",
      "useragent": "Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
    },
    {
      "asm_group_id": 10,
      "category": [
        "cat facts"
      ],
      "email": "example@test.com",
      "event": "group_resubscribe",
      "ip": "255.255.255.255",
      "sg_event_id": "VwYBgwxHDtk1B9lf81EJRA==",
      "sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0",
      "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
      "timestamp": 1670430408,
      "url": "http://www.sendgrid.com/",
      "useragent": "Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
    }
  ],
  "rudderId": "fc6137dc-0d3f-4109-bb43-f4ae8917ff90",
  "type": "track"
}
h
nope but you can do that yourself in a transform
s
Okay, it looks like a transform typically responds with a singular event. I should transform this to respond with an array of events and RS will just act accordingly?
h
you can return an array of events
s
Brilliant. TY!
👍 1