📺 Develpreneur YouTube Episode

Video + transcript

SQL Sync Part 30

2022-11-24 •Youtube

Detailed Notes

Focus for this episode: This episode continues the exploration of pulling only needed and related data into the target tables. It is tedious, but a step towards the final product.

This tutorial walks through the creation of a database synchronization tool in Python. It continues our Python and SQL Tutorials with a useful application that provides a deeper look at SQL structures and commands.

Repository For Code: git clone [email protected]:rbroadhead/dbsync.git

Transcript Text
thank you
[Music]
well hello and welcome back we are
continuing our series on SQL and Python
and this episode We are continuing
looking at the complicated polling
related data piece now I apologize I
didn't kick I didn't turn on record
I was actually troubleshooting a few
things but uh luckily it's something I
can catch us up pretty quick and
straighten a few things out so first
thing is is if you remember last time we
were working from our constraint names
so if we did
uh here so we get our constraint name
uh yeah so like in this case
so whoop
when I when I'm looking up uh because
first thing we do is we find all the
constraints related to a table so it'd
be something like this I'm going to get
all my constraint names
and now with each constraint name what I
want to do
is I'm going to go in for that
constraint name I'm going to say hey
what is the referenced table
because then what I need to do is I'm
going to pull
table from data
from that table based on which IDs exist
in my actual table
and we one of the things that I missed
was actually what we need to do
is now we need to find all the things
that reference that table name
so that's going to be
uh well in this case let's say host so
I'm going to do
for now what I'm going to do is this is
going to be referenced
table name
and if we call it host
hopefully it's going to be yeah so what
we need to do
is we're going to what we really need
here is we're going to say okay all of
these tables
have data
that references some record in here
so what we're going to do is where we
were running through and doing our our
little Union thing that we were building
which was all of the cases
uh where let's see
let's see if I've got that one sitting
here real quick
uh yeah should be stuff like this so I
do this
and get what's all the records where I'm
gonna grab all the records where they
are referred to and then I'm gonna have
to Union that
and we ended up doing something
moderately complicated because we have
to do that for each of the tables so if
we go back to like our host
we're going to need to do this for each
of these tables
which becomes
a tad of a challenge because what we're
going to have to do is for each one of
those
and that's actually we don't want it out
of that we want it out of our
constraints I think let's see
yeah so it's actually instead what we
need is we need to find each of these
where
uh reference table name
equals our table name
sort of host in this case because what
we need to do yeah so each of these we
got to figure out what their what the
table is referring to so in this case
we're going to build like a series of
selects we weren't quite doing it right
before so first thing we do
and that's sort of where I got to so the
first thing we're doing is we're going
to grab our constraint
so this is one where we get our cons
based on our constraint name which is
here
and then what we want to do is we want
to take the reference table name and
we're going to build out this query here
using the reference table name
and actually we don't need to do it if
that table's already been loaded so what
we're going to do is we're going to come
here
uh Source SQL blah blah blah blah blah
we're going to grab our
okay so here we grab our table in our
schema which is right here pointed that
doesn't help since you're not seeing
that so it's our table here
and we're going to say if
uh and this is a table Source table
not in
imported tables
then we're going to have to do some
loading on it
and if it is then we can just skip it so
if it is I'm sorry if it's not
this is where we're going to come in and
do
this query
based on the reference table name and so
if we look here
like that so if you see here this is
this select
reference table name constraint schema
constraint name table name constraint
schema let's just do that whole thing
I think that's what I want I think I
just go with those guys and so I'm going
to do those
from referential constraints
and then it's going to be where
reference table name equals the source
table
and then I'm going to set that guy up
I'm going to execute and I'm going to do
fetch all so this is going to give me
uh this one right yeah so this is going
to give me this one
which is not the one I want is it this
isn't what I want
oh apologies I just blew up my okay
let's fix that
it's probably the one I had before I
shouldn't have done that but that's okay
so let's go back so we're going to take
our
select so select that
oops from here
oh
where
yeah we're reference table name equals
okay
so that gets us this list down here and
so this is where we're going to start
building our rather complicated stuff
and here so let's say so the first one
we're going to do
is going to be very similar so we've got
uh for Source row and Source rows is
that what we want
um
let's see oh I'm sorry
so we're going to take this now move
that over because now what we want to do
is we're going to go through our source
rows which is there and for each one of
those
we don't need to worry about it being in
imported tables
because we've already checked for it up
here
and then in each of these we're going to
take
select from the constraint schema which
is zero
dot table
where Source Row 2 the reference column
name
is in select distinct column name from
the schema
constraint schema and then the table
name
so if we do that and we're going to do
the same thing here
and so what we should see is let's do
this let's see how this looks
and we're going to print it
hopefully we'll be able to see
a good example here
let's see what it's going to run for us
and let's see so it's going to come in
and it's going to do that
and it's not really giving me too much
here because
oh so if it's not in the imported tables
then I need to import it otherwise the
data is good so I can move on
oh and this is the problem is
this whole thing
so I have to insert that data
so where am I at here so I'm doing the
referential loads that means I'm going
to go through
all of these guys which means I can
probably just take all of that and move
it down one oops
yeah if he's not in
then I'm gonna have to describe them and
we have to do my inserts
and I'm going to build this big honking
thing
looks like this
I think that's how it's going to look
let's see how this
runs through
and
see I should see one here at some point
maybe not
so if he's not in
imported tables
then he does a referential load
if he is and I'll go through here I'm
going to get all my parents
and maybe missing one here
let's see what did I do
so check if it's referenced in a foreign
key
oh this may be what maybe I double
dipped on this so that is
this one
all right maybe that one
uh from referential constraints so it's
here
so let's see if it exists if it does
okay that's my keys
I don't really need that check SQL
so I'm going to execute that blah blah
blah blah
I don't think I need you
so
all right let's just walk through this
thing real quick
so grab my rose if I get a row back then
what I'm going to do is for each of
those rows I'm going to walk back
I'm going to look at the parent
s here
so if he's already covered
if he's not in imported tables then I'm
going to take him up a level
and actually
let's see
what I can probably do is take this and
not worry about that else
because what happens is if he
is not oh
so if he's not then what I want to do oh
okay then I want to do is I want to take
him
okay oh that's wait
then I'm going to call him
for the parents okay
and let's reach of the parents
okay so I may be all right and then I'm
going to come in and I'm going to get
the columns
let's see if for example did I get all
of my
data come through
it did not
okay
so that's what I thought so I'm going to
come in if I find them
I'm going to see is the oh those are
those constraints so if all those
constraints are loaded then I'm good
otherwise
which means if all of those constraints
are loaded
then
I need to check to see I need to load
the parents
uh let's see otherwise and if I do
it's where I'm off some so if I if
parents are loaded then I gotta load
this guy which is
I think like that
oh just do one more
okay let's try that
Okay so
load all this parents now that his
parents are done now I got to go figure
out what I need to load for him
so now I'm going to go in and find
anywhere that he
exists
uh which actually I don't even need to
do that because I already know what he
is right
so now I need to go find for that table
and then uh let me get my so I'm going
to make sure all of those guys are done
so if
he's not there
oh actually I don't have to worry about
that anymore
because I what I need to do
is check all the places where this table
exists
and I've already checked about him not
being in there so I may be able to
simplify this up quite a bit
apologies while I'm thinking my way
thinking on my feet here
so
let me go to all his parents
which is
here
someone goes through all those parents
I'm going to say are they loaded once
they're loaded
now I can do the contract so now what
I'm going to do is I'm going to save
like in this case I'm going to say
everywhere that he's in there
so he's referenced
in contract document so now I just need
to go to him
which is let's see is this the right one
so this is the one where referential
constraints
which is this one okay so I'm going to
go through that and then I'm going to
say all right for each of those
I don't need this
uh actually I guess I can do it from
here so I can just go straight to
uh I want to go straight to the call
which is
column usage or just keep calling usage
I had that in here somewhere
keep column usage so if I go to that to
contract or you know let's say contract
for this example
and then I just need to build it so I
can actually shrink that thing out
uh and that's everywhere that this is
equal to table
oh which means I probably don't even
need that check SQL
so let's do this
so now I'm going to get those
I'm going to get my source rows
do my smart load Source rows blah blah
blah blah blah so let's do that
and
I don't have a source to now
so I can close that I don't have to
worry about closing him out
so now let's look at it
so I should see it quit right there
so
I'm going to do that so this is that
contract one so I'm actually right on
track for this
oh and now I'm back to sort of where I
was because what it's going to do is
build this it only exists once okay
oh contract document doesn't have any
records
oh so I don't even need a contract
there you go
okay
so for example
uh let's see look up States
so I wonder if that means that there's
nobody that uses lookup States okay
and he's going to do that he's going to
do that for item and results
uh he's going to build that for River
row and destination Rose
which is probably going to be none
so now if we look at our smart loaded
sequel It's going to be probably nothing
uh Source schema
is and 509 so we probably missed one
oh
uh Source schema
is
let's just do
we can do that we can go where'd we call
that SRC schema
equals
Source rows
zero zero
well let's see this
I do that
otherwise if we have data for that then
Source schema
equals
Source row zero
and then where do I do that
now I say if
let's see this ifs or schema
not equal to that then I'm actually
going to go do some stuff then I have
some stuff to insert
and so I've got a couple of things so
Source table
is just going to be table
oh no
where is it
some reference table name
yeah so that's just table I don't really
need it
Source table is somewhere else I used it
there we go that's just table
and that means I'm done so I get to
impend it and say that yes it's loaded
and so if
so if his Source schema is not equal to
that
then I do something otherwise what I can
do
is else
did I give it a column number nope
um
let's do this
comma Max rows
and then Haze else gonna do
uh he's gonna do load table data
which is going to be table comma
X rows
so when I do referential load
he also gets oops so who calls
referential load
when he gets called here he gets called
from okay smart empty
Max Rose
so I think
is that the only place he gets called
yes it is so now
we're gonna see this come through
so that's our contract so we can go pick
on this
and we're getting a little long so we're
probably gonna wrap this one up but
let's go look real quick here okay so he
does a smart load he's good
and then here
well let's go ahead and run it through
let's see what happens
I don't know if I'm going to quits left
we'll find out in a second okay so we
are blowing up here
and so it looks like it's doing it
because it already exists so it's double
entering on uh the member table so we're
going to go look there's someone we're
probably not we're loading and we're
probably not loading it into
um
probably not marking that it has been
properly loaded it's not in the oh which
is probably right here
because I think we need uh imported
tables equals
so I think if we do load
table
data
uh let's see
so
oh maybe not
load table data does not return okay so
uh let's sync rows
which means
oh I just load table data
he doesn't add it to sync rows because
there are sync tables
oh that's sync we need smart sync
uh so the table data
is
let's go back there
load table data oops
load table data load table there we go
so here
we actually need this to be we don't
need that here but what we do know
what we do need is to go to imported
tables and add
which we probably already have that
somewhere
I am not seeing it oh here we go
so in this case he closes it up in this
case he does that okay
and then returns it so we should be in
good shape let's see
let's see we'll give it one more try
here
see if it comes through if it blows up
again and it does so we're gonna go
check that out next time around I think
we've gone long enough this time
and we will continue chasing this down
because it is getting a little
complicated and uh we'll just continue
to walk through it and see where it's
blowing up see where we have missed uh
double entering a record and uh we'll
just move forward from there hopefully
we're getting pretty close and we'll be
able to see this thing wrap up in the
next episode or two that being said go
out there and have yourself a great day
a great week and we will talk to you
next time
thank you
foreign
Transcript Segments
10.7

thank you

18.89

[Music]

27.24

well hello and welcome back we are

29.64

continuing our series on SQL and Python

32.22

and this episode We are continuing

35.04

looking at the complicated polling

38.7

related data piece now I apologize I

41.94

didn't kick I didn't turn on record

45.12

I was actually troubleshooting a few

46.86

things but uh luckily it's something I

49.2

can catch us up pretty quick and

51.059

straighten a few things out so first

53.28

thing is is if you remember last time we

56.699

were working from our constraint names

58.44

so if we did

63.14

uh here so we get our constraint name

70.7

uh yeah so like in this case

74.04

so whoop

76.2

when I when I'm looking up uh because

78.78

first thing we do is we find all the

80.1

constraints related to a table so it'd

81.659

be something like this I'm going to get

82.799

all my constraint names

84.36

and now with each constraint name what I

87.479

want to do

89.159

is I'm going to go in for that

90.42

constraint name I'm going to say hey

92.34

what is the referenced table

96.479

because then what I need to do is I'm

97.86

going to pull

99.24

table from data

102.24

from that table based on which IDs exist

105.299

in my actual table

107.52

and we one of the things that I missed

109.799

was actually what we need to do

112.32

is now we need to find all the things

115.32

that reference that table name

117.96

so that's going to be

122.299

uh well in this case let's say host so

125.46

I'm going to do

131.459

for now what I'm going to do is this is

133.5

going to be referenced

136.379

table name

138

and if we call it host

142.8

hopefully it's going to be yeah so what

144.3

we need to do

146.34

is we're going to what we really need

147.78

here is we're going to say okay all of

150.42

these tables

151.86

have data

153.72

that references some record in here

157.14

so what we're going to do is where we

158.879

were running through and doing our our

162.54

little Union thing that we were building

164.599

which was all of the cases

168

uh where let's see

171.3

let's see if I've got that one sitting

172.86

here real quick

174.48

uh yeah should be stuff like this so I

177.42

do this

180.3

and get what's all the records where I'm

183.06

gonna grab all the records where they

184.56

are referred to and then I'm gonna have

186.3

to Union that

187.62

and we ended up doing something

188.94

moderately complicated because we have

190.92

to do that for each of the tables so if

192.659

we go back to like our host

197.34

we're going to need to do this for each

199.379

of these tables

202.2

which becomes

204.42

a tad of a challenge because what we're

207

going to have to do is for each one of

208.739

those

210.48

and that's actually we don't want it out

212.459

of that we want it out of our

214.08

constraints I think let's see

217.8

yeah so it's actually instead what we

221.159

need is we need to find each of these

223.08

where

224.94

uh reference table name

230.099

equals our table name

233.099

sort of host in this case because what

235.68

we need to do yeah so each of these we

238.799

got to figure out what their what the

240.659

table is referring to so in this case

242.819

we're going to build like a series of

244.92

selects we weren't quite doing it right

247.44

before so first thing we do

250.08

and that's sort of where I got to so the

252.599

first thing we're doing is we're going

253.62

to grab our constraint

256.38

so this is one where we get our cons

257.94

based on our constraint name which is

259.859

here

262.32

and then what we want to do is we want

264.12

to take the reference table name and

266.34

we're going to build out this query here

269.639

using the reference table name

272.22

and actually we don't need to do it if

275.04

that table's already been loaded so what

276.96

we're going to do is we're going to come

278.34

here

279.12

uh Source SQL blah blah blah blah blah

282.36

we're going to grab our

285.9

okay so here we grab our table in our

288.12

schema which is right here pointed that

291.3

doesn't help since you're not seeing

292.44

that so it's our table here

294.96

and we're going to say if

297.24

uh and this is a table Source table

301.44

not in

303.56

imported tables

306.72

then we're going to have to do some

308.16

loading on it

310.08

and if it is then we can just skip it so

313.38

if it is I'm sorry if it's not

317.04

this is where we're going to come in and

320.4

do

322.44

this query

326.58

based on the reference table name and so

329.639

if we look here

333.36

like that so if you see here this is

335.28

this select

338.28

reference table name constraint schema

341.639

constraint name table name constraint

344.52

schema let's just do that whole thing

347.52

I think that's what I want I think I

348.96

just go with those guys and so I'm going

350.88

to do those

352.919

from referential constraints

363.539

and then it's going to be where

365.46

reference table name equals the source

368.039

table

372.139

and then I'm going to set that guy up

375.12

I'm going to execute and I'm going to do

376.56

fetch all so this is going to give me

381.18

uh this one right yeah so this is going

383.699

to give me this one

386.819

which is not the one I want is it this

390.3

isn't what I want

391.62

oh apologies I just blew up my okay

394.199

let's fix that

397.08

it's probably the one I had before I

398.94

shouldn't have done that but that's okay

400.139

so let's go back so we're going to take

401.639

our

403.199

select so select that

406.62

oops from here

413.699

oh

418.199

where

421.74

yeah we're reference table name equals

424.38

okay

428.52

so that gets us this list down here and

431.28

so this is where we're going to start

432.36

building our rather complicated stuff

435.979

and here so let's say so the first one

439.62

we're going to do

441.9

is going to be very similar so we've got

444.06

uh for Source row and Source rows is

448.86

that what we want

450.96

um

451.68

let's see oh I'm sorry

455.039

so we're going to take this now move

457.919

that over because now what we want to do

460.139

is we're going to go through our source

461.88

rows which is there and for each one of

464.099

those

465.479

we don't need to worry about it being in

468.419

imported tables

474.479

because we've already checked for it up

476.34

here

480

and then in each of these we're going to

482.94

take

483.96

select from the constraint schema which

486.599

is zero

488.4

dot table

491.28

where Source Row 2 the reference column

495

name

496.74

is in select distinct column name from

502.56

the schema

504.84

constraint schema and then the table

507.78

name

508.86

so if we do that and we're going to do

510.36

the same thing here

514.32

and so what we should see is let's do

517.2

this let's see how this looks

522.479

and we're going to print it

525.42

hopefully we'll be able to see

528.72

a good example here

532.26

let's see what it's going to run for us

538.82

and let's see so it's going to come in

541.56

and it's going to do that

544.019

and it's not really giving me too much

545.76

here because

547.8

oh so if it's not in the imported tables

551.82

then I need to import it otherwise the

553.56

data is good so I can move on

556.86

oh and this is the problem is

560.36

this whole thing

563.459

so I have to insert that data

572.399

so where am I at here so I'm doing the

574.44

referential loads that means I'm going

575.7

to go through

576.8

all of these guys which means I can

580.44

probably just take all of that and move

581.7

it down one oops

584.459

yeah if he's not in

586.86

then I'm gonna have to describe them and

588.36

we have to do my inserts

592.44

and I'm going to build this big honking

596.16

thing

597.959

looks like this

599.7

I think that's how it's going to look

600.959

let's see how this

602.7

runs through

609.36

and

613.74

see I should see one here at some point

615.899

maybe not

620.88

so if he's not in

627.839

imported tables

632.22

then he does a referential load

635.64

if he is and I'll go through here I'm

637.86

going to get all my parents

643.08

and maybe missing one here

650.94

let's see what did I do

655.44

so check if it's referenced in a foreign

657.42

key

658.38

oh this may be what maybe I double

660.36

dipped on this so that is

663.72

this one

667.2

all right maybe that one

670.279

uh from referential constraints so it's

673.74

here

674.64

so let's see if it exists if it does

676.8

okay that's my keys

678.779

I don't really need that check SQL

680.82

so I'm going to execute that blah blah

682.62

blah blah

686.22

I don't think I need you

688.8

so

690.24

all right let's just walk through this

691.8

thing real quick

693.66

so grab my rose if I get a row back then

696.12

what I'm going to do is for each of

697.38

those rows I'm going to walk back

700.32

I'm going to look at the parent

702.66

s here

705.24

so if he's already covered

707.459

if he's not in imported tables then I'm

710.82

going to take him up a level

715.82

and actually

721.32

let's see

724.44

what I can probably do is take this and

727.2

not worry about that else

730.5

because what happens is if he

732.6

is not oh

737.579

so if he's not then what I want to do oh

740.22

okay then I want to do is I want to take

741.839

him

745.56

okay oh that's wait

748.62

then I'm going to call him

752.1

for the parents okay

755.76

and let's reach of the parents

758.76

okay so I may be all right and then I'm

760.32

going to come in and I'm going to get

761.279

the columns

763.56

let's see if for example did I get all

766.5

of my

768.18

data come through

771.42

it did not

778.44

okay

782.1

so that's what I thought so I'm going to

783.54

come in if I find them

785.82

I'm going to see is the oh those are

788.16

those constraints so if all those

789.18

constraints are loaded then I'm good

790.5

otherwise

793.86

which means if all of those constraints

795.899

are loaded

798.48

then

806.519

I need to check to see I need to load

809.399

the parents

812.1

uh let's see otherwise and if I do

816.839

it's where I'm off some so if I if

818.639

parents are loaded then I gotta load

819.959

this guy which is

827.04

I think like that

829.139

oh just do one more

837.06

okay let's try that

839.7

Okay so

841.38

load all this parents now that his

843.839

parents are done now I got to go figure

845.639

out what I need to load for him

847.98

so now I'm going to go in and find

851.36

anywhere that he

855.959

exists

863.779

uh which actually I don't even need to

865.98

do that because I already know what he

867.12

is right

871.44

so now I need to go find for that table

880.68

and then uh let me get my so I'm going

884.579

to make sure all of those guys are done

887.82

so if

889.079

he's not there

894.959

oh actually I don't have to worry about

896.339

that anymore

898.38

because I what I need to do

902.1

is check all the places where this table

904.92

exists

911.76

and I've already checked about him not

913.92

being in there so I may be able to

915.12

simplify this up quite a bit

918.86

apologies while I'm thinking my way

921.12

thinking on my feet here

923.88

so

927.72

let me go to all his parents

929.639

which is

932.519

here

933.959

someone goes through all those parents

935.339

I'm going to say are they loaded once

937.139

they're loaded

939.24

now I can do the contract so now what

941.76

I'm going to do is I'm going to save

942.6

like in this case I'm going to say

945.12

everywhere that he's in there

953.459

so he's referenced

957.24

in contract document so now I just need

959.94

to go to him

962.22

which is let's see is this the right one

964.26

so this is the one where referential

966.12

constraints

967.56

which is this one okay so I'm going to

970.139

go through that and then I'm going to

972.06

say all right for each of those

974.66

I don't need this

980.699

uh actually I guess I can do it from

982.62

here so I can just go straight to

987.38

uh I want to go straight to the call

989.699

which is

991.5

column usage or just keep calling usage

993.899

I had that in here somewhere

996.72

keep column usage so if I go to that to

999

contract or you know let's say contract

1003.56

for this example

1005.839

and then I just need to build it so I

1008

can actually shrink that thing out

1012.519

uh and that's everywhere that this is

1015.079

equal to table

1020.42

oh which means I probably don't even

1021.68

need that check SQL

1026.059

so let's do this

1031.16

so now I'm going to get those

1033.679

I'm going to get my source rows

1036.559

do my smart load Source rows blah blah

1039.02

blah blah blah so let's do that

1042.02

and

1044.12

I don't have a source to now

1047.9

so I can close that I don't have to

1050.179

worry about closing him out

1053.419

so now let's look at it

1056.84

so I should see it quit right there

1059.12

so

1061.76

I'm going to do that so this is that

1063.74

contract one so I'm actually right on

1065.78

track for this

1069.02

oh and now I'm back to sort of where I

1071.66

was because what it's going to do is

1073.4

build this it only exists once okay

1078.02

oh contract document doesn't have any

1079.94

records

1082.52

oh so I don't even need a contract

1086.12

there you go

1088.1

okay

1089.179

so for example

1093.559

uh let's see look up States

1101

so I wonder if that means that there's

1102.5

nobody that uses lookup States okay

1108.62

and he's going to do that he's going to

1110.48

do that for item and results

1113

uh he's going to build that for River

1114.86

row and destination Rose

1117.799

which is probably going to be none

1121.76

so now if we look at our smart loaded

1123.32

sequel It's going to be probably nothing

1126.74

uh Source schema

1129.62

is and 509 so we probably missed one

1134.12

oh

1135.679

uh Source schema

1138.38

is

1144.62

let's just do

1148.1

we can do that we can go where'd we call

1151.1

that SRC schema

1153.74

equals

1155.84

Source rows

1158.059

zero zero

1161.78

well let's see this

1166.34

I do that

1167.84

otherwise if we have data for that then

1170.299

Source schema

1172.1

equals

1174.14

Source row zero

1178.88

and then where do I do that

1183.44

now I say if

1187.52

let's see this ifs or schema

1190.82

not equal to that then I'm actually

1194.419

going to go do some stuff then I have

1195.919

some stuff to insert

1205.52

and so I've got a couple of things so

1207.26

Source table

1214.48

is just going to be table

1219.14

oh no

1222.14

where is it

1226.52

some reference table name

1229.58

yeah so that's just table I don't really

1232.34

need it

1233.6

Source table is somewhere else I used it

1238.16

there we go that's just table

1240.98

and that means I'm done so I get to

1243.5

impend it and say that yes it's loaded

1250.4

and so if

1254.96

so if his Source schema is not equal to

1258.74

that

1261.44

then I do something otherwise what I can

1263.6

do

1266.26

is else

1270.74

did I give it a column number nope

1274.76

um

1275.86

let's do this

1278.5

comma Max rows

1283.88

and then Haze else gonna do

1288.86

uh he's gonna do load table data

1292.52

which is going to be table comma

1297.08

X rows

1300.08

so when I do referential load

1303.559

he also gets oops so who calls

1306.559

referential load

1312.2

when he gets called here he gets called

1315.74

from okay smart empty

1320.419

Max Rose

1322.94

so I think

1327.62

is that the only place he gets called

1328.82

yes it is so now

1335.6

we're gonna see this come through

1339.26

so that's our contract so we can go pick

1341.96

on this

1343.64

and we're getting a little long so we're

1345.02

probably gonna wrap this one up but

1346.28

let's go look real quick here okay so he

1348.799

does a smart load he's good

1353.059

and then here

1356.72

well let's go ahead and run it through

1358.1

let's see what happens

1360.62

I don't know if I'm going to quits left

1361.82

we'll find out in a second okay so we

1363.679

are blowing up here

1366.38

and so it looks like it's doing it

1368.059

because it already exists so it's double

1369.559

entering on uh the member table so we're

1373.34

going to go look there's someone we're

1374.72

probably not we're loading and we're

1376.52

probably not loading it into

1379.4

um

1380.96

probably not marking that it has been

1384.1

properly loaded it's not in the oh which

1386.84

is probably right here

1388.22

because I think we need uh imported

1392.559

tables equals

1396.38

so I think if we do load

1398.539

table

1400.22

data

1406.539

uh let's see

1410.84

so

1414.26

oh maybe not

1416.059

load table data does not return okay so

1420.74

uh let's sync rows

1424.88

which means

1428.419

oh I just load table data

1432.38

he doesn't add it to sync rows because

1436.46

there are sync tables

1440.78

oh that's sync we need smart sync

1443.74

uh so the table data

1446.799

is

1448.52

let's go back there

1450.02

load table data oops

1453.799

load table data load table there we go

1457.039

so here

1462.32

we actually need this to be we don't

1464.539

need that here but what we do know

1466.7

what we do need is to go to imported

1468.919

tables and add

1471.2

which we probably already have that

1473.12

somewhere

1477.34

I am not seeing it oh here we go

1481.28

so in this case he closes it up in this

1484.159

case he does that okay

1486.86

and then returns it so we should be in

1488.96

good shape let's see

1491.919

let's see we'll give it one more try

1494.179

here

1499.34

see if it comes through if it blows up

1500.9

again and it does so we're gonna go

1503.6

check that out next time around I think

1505.34

we've gone long enough this time

1507.74

and we will continue chasing this down

1509.96

because it is getting a little

1511.159

complicated and uh we'll just continue

1513.679

to walk through it and see where it's

1514.88

blowing up see where we have missed uh

1517.7

double entering a record and uh we'll

1520.52

just move forward from there hopefully

1521.9

we're getting pretty close and we'll be

1523.76

able to see this thing wrap up in the

1525.32

next episode or two that being said go

1528.08

out there and have yourself a great day

1529.279

a great week and we will talk to you

1532.36

next time

1539.74

thank you

1542.96

foreign