jvalue / ods

Open Data Service - Make consuming open data easy, safe, and reliable
GNU Affero General Public License v3.0
36 stars 23 forks source link

Execute Datasource after creation #329

Closed georg-schwarz closed 2 years ago

georg-schwarz commented 3 years ago

There should be a checkbox if there should be an initial execution after creating.

f3l1x98 commented 2 years ago

@georg-schwarz What about edit: Should this still be displayed -> trigger after update?

and I guess if that switch/checkbox is active, the firstExecution Datepicker should be disabled in frontend and ignored in backend?

georg-schwarz commented 2 years ago

Good question.

I think the "trigger after update" should not be an alternative to the scheduling, but an addition. Maybe a better way to solve it consistently is to offer a trigger-button that lets the whole ETL pipeline run by a manual trigger? Then we have one consistent way how it is handled in all cases (by a button click) if the user wants an immediate execution.

There should be an endpoint for it: {base_url}/datasources/{id}/trigger

f3l1x98 commented 2 years ago

My first rough idea was to disable the first execution trigger in frontend and in the backend set it to new Date(Instant.now()). The rest I would leave as is -> pass it to the scheduler with the Instant.now() as first execution

But yes, that should perhaps not be done during update.

f3l1x98 commented 2 years ago

But yeah the endpoint still exists, we could also simply give the user a button somewhere to trigger it manually himself

georg-schwarz commented 2 years ago

Let's do that first (just offering the manual trigger), we can do more elaborate solutions afterwards as well.