Interface CrudIngestionRunRepository

  • All Known Implementing Classes:
    DefaultIngestionRunRepository

    public interface CrudIngestionRunRepository
    A repository for basic storage of the ingestion run information. Unlike IngestionRunRepository this repository should only provide simple CRUD operations, treating the provided/fetched data as is, without any additional logic.
    • Method Detail

      • save

        void save​(IngestionRun ingestionRun)
        Saves the provided ingestion run.

        Since the startedAt and updatedAt properties of the run are required, they will be set to default values if not provided, despite the simple nature of this repository.

        Parameters:
        ingestionRun - ingestion run
      • findWhere

        List<IngestionRun> findWhere​(Column condition)
        Finds all ingestion runs satisfying the specified condition.
        Parameters:
        condition - ingestion run condition
        Returns:
        all ingestion runs satisfying the specified condition
      • findBy

        Optional<IngestionRun> findBy​(Column condition,
                                      Column sorted)
        Finds first ingestion run matching specified condition from sorted result.
        Parameters:
        condition - condition matching ingestion runs
        sorted - sorting order
        Returns:
        first ingestion run matching specified condition from sorted result
      • findOngoingIngestionRuns

        List<IngestionRun> findOngoingIngestionRuns()
        Finds all ingestion runs with the status of IN_PROGRESS.
        Returns:
        all ongoing ingestion runs
      • findOngoingIngestionRuns

        List<IngestionRun> findOngoingIngestionRuns​(String resourceIngestionDefinitionId)
        Finds all ingestion runs created for the specified resource ingestion definition id and with the status of IN_PROGRESS.
        Parameters:
        resourceIngestionDefinitionId - resource ingestion definition id
        Returns:
        all ongoing ingestion runs created for the specified resource ingestion definition id
      • findOngoingIngestionRunsWhere

        List<IngestionRun> findOngoingIngestionRunsWhere​(Column condition)
        Finds all ingestion runs satisfying the specified condition and with the status of IN_PROGRESS.
        Parameters:
        condition - condition for the ingestion run
        Returns:
        all ongoing ingestion runs satisfying the specified condition
      • getInstance

        static CrudIngestionRunRepository getInstance​(Session session)
        Returns a new instance of the default repository implementation.

        Default implementation of the repository uses the STATE.INGESTION_RUN table.

        Default implementation of the repository also implements additional methods from the IngestionRunRepository interface.

        Parameters:
        session - Snowpark session object
        Returns:
        a new repository instance