You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently relations belong to sources; however they really ought to belong to codecs (it doesn't matter where you get a row from: table, function, whatever; if it has an organization_id column then you should be able to get the organization associated with it).
However, relations can't exist until all the sources exist, so we have PgSourceBuilder as like a "this will be a PgSource, but it isn't right now" placeholder so that we can do circular relations. It's all weird and yucky.
Then at runtime, half the time we're talking about codecs, rather than sources, and they don't have relations. So currently we're doing hacky nonsense where we find a table-like source for that codec and pull the relations out of that. It's really wrong and unpleasant.
Solution: remove relations from sources; instead create them as a later phase and put then onto build.input as well - so now we get build.input.pgSourcesandbuild.input.pgRelations. Relations will relate a codec to a source - doesn't matter where the original row came from, but when fulfilling it we have to get it from somewhere (a source).
We're still going to want things like source.getRelations() to work, not 100% sure how to address that right now - perhaps pass the input object into this method...
Anyway, I'm going to keep the hacky way for now so I can keep making progress, but I'm really looking forward to getting rid of PgSourceBuilder!
The text was updated successfully, but these errors were encountered:
Currently relations belong to sources; however they really ought to belong to codecs (it doesn't matter where you get a row from: table, function, whatever; if it has an
organization_id
column then you should be able to get the organization associated with it).However, relations can't exist until all the sources exist, so we have PgSourceBuilder as like a "this will be a PgSource, but it isn't right now" placeholder so that we can do circular relations. It's all weird and yucky.
Then at runtime, half the time we're talking about codecs, rather than sources, and they don't have relations. So currently we're doing hacky nonsense where we find a table-like source for that codec and pull the relations out of that. It's really wrong and unpleasant.
Solution: remove relations from sources; instead create them as a later phase and put then onto
build.input
as well - so now we getbuild.input.pgSources
andbuild.input.pgRelations
. Relations will relate a codec to a source - doesn't matter where the original row came from, but when fulfilling it we have to get it from somewhere (a source).We're still going to want things like
source.getRelations()
to work, not 100% sure how to address that right now - perhaps pass the input object into this method...Anyway, I'm going to keep the hacky way for now so I can keep making progress, but I'm really looking forward to getting rid of
PgSourceBuilder
!The text was updated successfully, but these errors were encountered: