Is there way to update the meta from a different source

#1

I’m trying to update the meta of an entity type from a different source via the transform type. I was wondering if there was an annotation or some meta.override that I can put on a transform type.

I have two transforms going into the same entity type. When the first one gets populated, I can’t seem to override the meta.sourceSystem with the other transform.

i.e.
I have an entity type with {ID: 1, meta.sourceSystem: TEST1}. When I want to update the meta.sourceSystem to TEST2 via the transform, it remains TEST1.

meta : ~ expression {
sourceSystem: “TEST2”
}

0 Likes

#2

why not have a separate transform from the same canonical but will only update the meta on your source.
e.g.

entity type Source {
. . .
}
entity type Dest {
. . .
}
type CanonicalDest {
}
type TransformCanonicalDestToDest {
}
type TransformCanonicalDestToSource {
  id: ...
  meta : ~ expression {
   sourceSystem: “TEST2”
  }
}
0 Likes

#3

So I have
type TransformCanonicalDestToSource1 {
id: …
meta : ~ expression {
sourceSystem: “TEST1”
}
}

type TransformCanonicalDestToSource2 {
id: …
meta : ~ expression {
sourceSystem: “TEST2”
}
}

So if I curl/process a record with the same id {id: '1} through TransformCanonicalDestToSource1 and then run TransformCanonicalDestToSource2, the record will still say something like {id: ‘1’, meta.sourceSystem: “TEST1”} even though I want it to say {id: ‘1’, meta.sourceSystem: “TEST2”}

I believe I need a meta.override annotation of some sort in the transform type

0 Likes

#4

with the transforms you have, uploading data to CanonicalDest you end up with two objects:

  • Source1 with meta.sourceSystem set to "TEST1"
  • Source2 with meta.sourceSystem set to "TEST2"

Is not this what you wanted?

0 Likes

#5

type TransformCanonicalDest1ToSource {
id: ‘1’
meta : ~ expression {
sourceSystem: “TEST1”
}
}

type TransformCanonicalDest2ToSource {
id: ‘1’
meta : ~ expression {
sourceSystem: “TEST2”
}
}

When I run TransformCanonicalDest1ToSource, it’ll have id:1, TEST1. After I run this then run TransformCanonicalDest2ToSource, it’ll stay id:1, TEST1 when I’m expecting it to update to id:1, TEST2. The only workaround I know is using meta.override with a beforeCreate.

We have multiple source systems going to the same type with the same id, but want to have the meta.sourcesystem update.

0 Likes