samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Hoover <roger.hoo...@gmail.com>
Subject Joining Avro records
Date Thu, 09 Apr 2015 15:55:58 GMT
Hi Milinda and others,

This is an Avro question but since you guys are working on Avro support for
stream SQL, I thought I'd ask you for help.

If I have a two records of type A and B as below and want to join them
similar to "SELECT *" in SQL to produce a record of type AB, is there an
simple way to do this with Avro without writing code to copy each field
individually?

I appreciate any help.

Thanks,

Roger

{
  "name": "A",
  "type": "record",
  "namespace": "fubar",
  "fields": [{"name": "a", "type" : "int"}]
}

{
  "name": "B",
  "type": "record",
  "namespace": "fubar",
  "fields": [{"name": "b", "type" : "int"}]
}

{
  "name": "AB",
  "type": "record",
  "namespace": "fubar",
  "fields": [{"name": "a", "type" : "int"}, {"name": "b", "type" : "int"}]
}

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message