Refactor of scidb->ingest action