►
From YouTube: Running Data Team MR Jobs with a manually set variable
Description
Implemented in https://gitlab.com/gitlab-data/analytics/merge_requests/1473/ The data team can now specify which dbt models to run and test in the MR.
A
To
be
able
to
run
manual
jobs
and
specify
specific
variables,
it's
very
similar
to
what
we
do
previously
by
clicking
play,
but
instead
of
clicking
play,
you
actually
come
in
here
and
you
have
to
click
on
the
job
name
itself.
So
you
can
click
over
here
you
can
click
on
the
name,
just
don't
click
on
play.
Otherwise,
it's
gonna
actually
wrote
that
setting
the
variable
any
of
the
jobs
in
the
em
are
that
say,
specify
like
this
you'll
be
able
to.
You
need
to
specify
the
variable
to
be
able
to
execute
the
job
properly.
A
You'll
see,
there's
one
in
the
DBT
miscellaneous
stage.
That
requires
the
variable
specification
as
well
for
the
documentation,
the
variable
is
going
to
be
DBT
models
and
that's
true
for
the
jobs
in
the
DBT
run
and
the
jobs
in
the
DBT
miscellaneous
stage.
So
we're
gonna
go
to
specify
model
here.
You
click
on
it.
It's
going
to
take
you
to
a
new
page.
It
says
this
job
requires
a
manual
action.
A
So
what
we
do
here
is
we
type
in
the
key
which
is
DBT
models,
and
then
here
you
can
specify
anything
that
you
would
normally
put
on
the
DBT
command
line.
So
you
can
specify
a
single
model
like
s
FTC
account,
but
we
can
also
use
the
@
syntax
and
specify
something
like
SF
DC
accounts
XF.
This
will
get
inserted
into
the
command
line
statement
and
it
should
run
just
fine.
So
then,
you
click
trigger
this
manual
action.
A
A
A
And
we
can
see
here
that
we
echo
the
variable
DBT
models.
You
can
see
that
it
was
passed
inappropriately,
the
add
s,
50c
accounts,
X
F,
and
this
actually
gets
inserted
into
the
statement.
Dbt
run
models,
dollar
DBT
models.
This
follows
the
same
format.
If
it's
an
excluded,
others
it'll
be
excludes
this
variable
and
for
tests
it'll
be
DBT
tests
and
specify
the
other
models
as
well.