I always get confused about when should I use `Par...
# ask-community
I always get confused about when should I use
Assets or
Jobs. What are the best practices ?
Is your question “When should I use Assets vs Jobs”? Or was there something specific to partitioning?
It is related to partitioning. For example, I can have a multi-partitioned asset that downloads a file daily from external resources. I can achieve the same result by having a nonpartitioned asset but a partitioned job that will trigger the same asset several times (just changing the config_schema). Maybe I'm overcomplicating things here
We generally recommend using assets whenever your goal is to produce a file/table/ML model/other data asset It's common to use partitioned assets with partitioned jobs: i.e. your asset has a partition for each day, and the job materializes the partition for that day when it runs Here's documentation on how to do this: https://docs.dagster.io/concepts/partitions-schedules-sensors/partitions#partitioned-asset-jobs You could then use
to create a schedule that runs daily: https://docs.dagster.io/_apidocs/schedules-sensors#dagster.build_schedule_from_partitioned_job
❤️ 1