diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php
index 24fe07ae4b5b83bf16416a6cfe6be510745bdd80..8784c20c1af390110b0b0adc423602122de5beaf 100644
--- a/core/modules/migrate/src/MigrateExecutable.php
+++ b/core/modules/migrate/src/MigrateExecutable.php
@@ -12,6 +12,7 @@
 use Drupal\migrate\Event\MigrateRollbackEvent;
 use Drupal\migrate\Event\MigrateRowDeleteEvent;
 use Drupal\migrate\Exception\RequirementsException;
+use Drupal\migrate\Plugin\MigrateIdFilterInterface;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
 use Drupal\migrate\Plugin\MigrationInterface;
 use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
@@ -179,6 +180,12 @@ public function import() {

     $this->migration->setStatus(MigrationInterface::STATUS_IMPORTING);
     $source = $this->getSource();
+    if (!empty($this->idlist)) {
+      $migrate_source = $this->migration->getSourcePlugin();
+      if ($migrate_source instanceof MigrateIdFilterInterface) {
+        $migrate_source->setIdList($this->idlist);
+      }
+    }

     try {
       $source->rewind();
diff --git a/core/modules/migrate/src/Plugin/MigrateIdFilterInterface.php b/core/modules/migrate/src/Plugin/MigrateIdFilterInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..7f1d924a16adee28e5fa7ffdcbe94e076e8fbbf4
--- /dev/null
+++ b/core/modules/migrate/src/Plugin/MigrateIdFilterInterface.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\migrate\Plugin;
+
+/**
+ * Interface for plugins that support filtering by a set of IDs.
+ */
+interface MigrateIdFilterInterface {
+
+  /**
+   * Sets the list of IDs to filter by.
+   *
+   * @param array $idList
+   *   The list of IDs to filter by.
+   */
+  public function setIdList(array $idList);
+
+  /**
+   * Returns a list of IDs to filter by.
+   *
+   * @return array
+   *   The list of IDs to filter by.
+   */
+  public function getIdList();
+
+}
diff --git a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
index 7e4a009d7c22b7915fd7f198bc5d06fecb0699b8..9a17192f4159755bfd6c32073e5d302c0a9ec2df 100644
--- a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
+++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
@@ -8,6 +8,7 @@
 use Drupal\Core\State\StateInterface;
 use Drupal\migrate\Exception\RequirementsException;
 use Drupal\migrate\MigrateException;
+use Drupal\migrate\Plugin\MigrateIdFilterInterface;
 use Drupal\migrate\Plugin\MigrationInterface;
 use Drupal\migrate\Plugin\migrate\id_map\Sql;
 use Drupal\migrate\Plugin\MigrateIdMapInterface;
@@ -65,7 +66,7 @@
  * @see https://www.drupal.org/docs/8/api/database-api
  * @see \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
  */
-abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPluginInterface, RequirementsInterface {
+abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPluginInterface, MigrateIdFilterInterface, RequirementsInterface {

   /**
    * The query string.
@@ -104,6 +105,13 @@ abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPlugi
    */
   protected $batchSize = 0;

+  /**
+   * The list of source IDs to filter by.
+   *
+   * @var array|null
+   */
+  protected $idList = [];
+
   /**
    * {@inheritdoc}
    */
@@ -224,6 +232,20 @@ public function checkRequirements() {
     }
   }

+  /**
+   * {@inheritdoc}
+   */
+  public function getIdList() {
+    return $this->idList;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setIdList(array $idList) {
+    $this->idList = $idList;
+  }
+
   /**
    * Wrapper for database select.
    */
@@ -244,6 +266,31 @@ protected function prepareQuery() {
     $this->query->addTag('migrate_' . $this->migration->id());
     $this->query->addMetaData('migration', $this->migration);

+    $id_list = $this->getIdList();
+    if (!empty($id_list)) {
+      $id_fields = [];
+      $connection = $this->getDatabase();
+      foreach ($this->getIds() as $field_name => $field_schema) {
+        if (isset($field_schema['alias'])) {
+          $field_name = $connection->escapeAlias($field_schema['alias']) . '.' . $this->query->escapeField($field_name);
+        }
+        else {
+          $field_name = $this->query->escapeField($field_name);
+        }
+        $id_fields[] = $field_name;
+      }
+
+      $or = $this->query->orConditionGroup();
+      foreach ($id_list as $ids) {
+        $and = $this->query->andConditionGroup();
+        foreach ($ids as $key => $id) {
+          $and->condition($id_fields[$key], $id);
+        }
+        $or->condition($and);
+      }
+      $this->query->condition($or);
+    }
+
     return $this->query;
   }

