Other question I'm trying to test a partitioned jo...
# ask-community
n
Other question I'm trying to test a partitioned job doing:
Copy code
cdi_id = "bnc_case"
    result = job.execute_in_process(run_config=(RunConfig(
        ops={
            "customer_data_extract": RuntimeConfig(cdi_id=cdi_id, datagen=DataGenConfig(add=10)),
        }
    )), partition_key=cdi_id)
c
Is the job that you’re doing this on defined using
define_asset_job
? If so, I don’t think we support
execute_in_process
for that - would instead recommend using
materialize
on the set of assets
n
@chris yes I defined the job with
define_asset_job
! What's the difference in this case between using
materialize
and
execute_in_process
?
(that's odd depending on how we initialize the job we have to use different ways to execute in memory for testing)
c
Yea honestly it’s not a perfect solution… I think the real ideal here is to have a
materialize
method on the
Definitions
object, or an
execute_in_process
method on
Definitions
. The split is between ops and assets, not in how you initialize the job. The key thing is that with asset jobs, you don’t actually know what the assets defined are until specified on the
Definitions
object, so you would have to provide the asset definitions when calling
execute_in_process
, which is awkward
n
@chris Got it ! Could you point me to an example using
materialize
?