{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/quick-start-guide",
  "title": "Quickstart",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/quick-start-guide/",
  "summary": "Get started with a simple pipeline example",
  "aliases": [
    "/integrate/redis-data-integration/ingest/quick-start-guide/"
  ],
  "tags": [
    "redis-di"
  ],
  "last_updated": "2026-10-02T14:54:03+01:00",
  "page_type": "content",
  "content_hash": "c1e850027a8fa283bae8a52cba4652bb700d1f9a48adfc88a69e57f6d1e54a18",
  "sections": [
    {
      "id": "overview-1",
      "title": "Overview",
      "role": "overview",
      "text": "In this tutorial you will learn how to install RDI and set up a pipeline to ingest live data from a [PostgreSQL](https://www.postgresql.org/) database into a Redis database."
    },
    {
      "id": "prerequisites",
      "title": "Prerequisites",
      "role": "content",
      "text": "- A Redis Enterprise database that will serve as the pipeline target. The dataset that will be ingested is\n  quite small in size, so a single shard database should be enough. RDI also needs to maintain its\n  own database on the cluster to store state information. *This requires Redis Enterprise v6.4 or greater*.\n- [Redis Insight](https://redis.io/docs/latest/develop/tools/insight)\n  to edit your pipeline\n- A virtual machine (VM) with one of the following operating systems:  \n  * RHEL 8 or 9\n* Ubuntu 20.04, 22.04, or 24.04"
    },
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The following diagram shows the structure of the pipeline we will create (see\nthe [architecture overview](https://redis.io/docs/latest/integrate/redis-data-integration/architecture#overview) to learn how the pipeline works):\n\n![](https://redis.io/docs/latest/images/rdi/ingest/ingest-qsg.webp)\n\nHere, the RDI *collector* tracks changes in PostgreSQL and writes them to streams in the \nRDI database in Redis. The *stream processor* then reads data records from the RDI\ndatabase streams, processes them, and writes them to the target."
    },
    {
      "id": "install-postgresql",
      "title": "Install PostgreSQL",
      "role": "setup",
      "text": "We provide a [Docker](https://www.docker.com/) image for an example PostgreSQL\ndatabase that we will use for the tutorial. Follow the\n[instructions on our Github page](https://github.com/Redislabs-Solution-Architects/rdi-quickstart-postgres/tree/main)\nto download the image and start serving the database. The database, which is\ncalled `chinook`, has the [schema and data](https://www.kaggle.com/datasets/samaxtech/chinook-music-store-data?select=schema_diagram.png) for an imaginary online music store\nand is already set up for the RDI collector to use."
    },
    {
      "id": "install-rdi",
      "title": "Install RDI",
      "role": "setup",
      "text": "Install RDI using the instructions in the\n[VM installation guide](https://redis.io/docs/latest/integrate/redis-data-integration/installation/install-vm).\n\nRDI will create the pipeline template for your chosen source database type at\n`/opt/rdi/config`. You will need this pathname later when you prepare the pipeline for deployment\n(see [Prepare the pipeline](#prepare-the-pipeline) below).\n\nAt the end of the installation, RDI CLI will prompt you to set the access secrets\nfor both the source PostgreSQL database and the target Redis database. RDI needs these to\nrun the pipeline.\n\nUse the Redis Enterprise Cluster Manager UI to create the RDI database with the following requirements:\n\n* Redis Enterprise v6.4 or greater for the cluster.\n* For production, 250MB RAM with one primary and one replica is recommended, but for the\n  quickstart or for development, 125MB and a single shard is sufficient.\n* If you are deploying RDI for a production environment then secure this database with a password\n  and TLS.\n* Set the database's\n  [eviction policy](https://redis.io/docs/latest/operate/rs/databases/memory-performance/eviction-policy) to `noeviction`. Note that you can't set this using\n  [`rladmin`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin),\n  so you must either do it using the admin UI or with the following\n  [REST API](https://redis.io/docs/latest/operate/rs/references/rest-api)\n  command:\n\n  [code example]\n* Set the database's\n  [data persistence](https://redis.io/docs/latest/operate/rs/databases/configure/database-persistence)\n  to AOF - fsync every 1 sec. Note that you can't set this using\n  [`rladmin`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin),\n  so you must either do it using the admin UI or with the following\n  [REST API](https://redis.io/docs/latest/operate/rs/references/rest-api)\n  commands:\n\n  [code example]\n If you don't have permissions to use AOF persistence, please check the [Using RDI without persistence](https://redis.io/docs/latest/integrate/redis-data-integration/faq#can-i-use-rdi-without-persistence-enabled) section in the FAQ.\n\n* **Ensure that the RDI database is not clustered.** RDI will not work correctly if the\n  RDI database is clustered (but note that the target database *can* be clustered without\n  any problems).\n\n  When you create the RDI database, expand the **Clustering** section and make sure the\n  **Sharding** option is *unchecked* (as shown below).\n\n  ![The Sharding option is unchecked in the Clustering section of the create database form.](https://redis.io/docs/latest/images/rdi/ingest/RDIClusterSetting.webp)\n\n  You can check if your RDI database is clustered from its **Configuration** tab in the\n  Cluster Manager UI. In the **Clustering** section, **Sharding** should be set to **Disabled**,\n  as shown in the following screenshot:\n\n  ![The Clustering section of the database Configuration tab shows Sharding: Disabled.](https://redis.io/docs/latest/images/rdi/ingest/RDICheckUnclustered.webp)\n\n  If you find the database has been clustered by mistake, you must create a new database with\n  sharding disabled before continuing with the RDI installation."
    },
    {
      "id": "prepare-the-pipeline",
      "title": "Prepare the pipeline",
      "role": "content",
      "text": "During the installation, RDI placed the pipeline templates at `/opt/rdi/config`.\nIf you go to that folder and run the `ll` command, you will see the pipeline\nconfiguration file, `config.yaml`, and the `jobs` folder (see the page about\n[Pipelines](https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines) for more information). Use Redis Insight to open\nthe `config.yaml` file and then edit the following settings:\n\n- Set the `host` to `localhost` and the `port` to 5432.\n- Under `tables`, specify the `Track` table from the source database.\n- Add the details of your target database to the `target` section.\n\nAt this point, the pipeline is ready to deploy.\n\nThis tutorial uses one source database, but a pipeline can capture from several source databases\ninto the same Redis target. See\n[Multiple sources in one pipeline](https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/multiple-sources) for more information."
    },
    {
      "id": "create-context",
      "title": "Create a context (optional)",
      "role": "content",
      "text": "To manage and inspect RDI, you can use the\n[`redis-di`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli)\nCLI tool, which has several commands for different purposes. Most of these commands connect to\nthe RDI API, which you specify with the `--api-url` option. You can avoid typing this and the other\nconnection options repeatedly by saving them in a *context*.\n\nWhen you activate a context, its saved connection options are used automatically whenever\nyou use `redis-di`. If you have more than one RDI installation, you can create a context\nfor each of them and select the one you want to be active using its unique name.\n\nTo create a context, use the\n[`redis-di set-context`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-set-context)\ncommand. For a VM installation, the API has the same hostname or IP address as your RDI VM and uses\nthe default HTTPS port 443:\n\n[code example]\n\nYou can save a few other options, such as a CA certificate (`--cacert`) if the API uses a private\ncertificate (see the\n[reference page](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-set-context)\nfor details). When you have created a context, use\n[`redis-di use-context`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-use-context)\nto activate it:\n\n[code example]\n\nThere are also subcommands to\n[list](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-list-contexts)\nand [delete](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-delete-context)\ncontexts."
    },
    {
      "id": "deploy-the-pipeline",
      "title": "Deploy the pipeline",
      "role": "content",
      "text": "You can deploy the pipeline with the following command:\n\n[code example]\n\nwhere the path is the one you supplied earlier during the installation. (You may also need\nto supply the `--api-url` option if you are not using a\n[context](#create-context) as described above.) RDI first\nvalidates your pipeline and then deploys it if the configuration is correct.\n\nYou can also use [Redis Insight](https://redis.io/docs/latest/develop/tools/insight/rdi-connector)\nto deploy the pipeline, by adding a connection to the RDI API\nendpoint (which has the same hostname or IP address as your RDI VM and uses the default HTTPS port 443) and then clicking the **Deploy** button.\n\nOnce the pipeline is running, you can use Redis Insight to view the data flow using the\npipeline metrics. You can also connect to your target database to see the keys that RDI has written there.\n\nSee [Deploy a pipeline](https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/deploy)\nfor more information about deployment settings."
    },
    {
      "id": "view-rdis-response-to-data-changes",
      "title": "View RDI's response to data changes",
      "role": "content",
      "text": "Once the pipeline has loaded a *snapshot* of all the existing data from the source,\nit enters *change data capture (CDC)* mode (see the\n[architecture overview](https://redis.io/docs/latest/integrate/redis-data-integration/architecture#overview)\nand the\n[ingest pipeline lifecycle](https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines#pipeline-lifecycle)\nfor more information\n).\n\nTo see the RDI pipeline working in CDC mode:\n \n- Create a simulated load on the source database\n  (see [Generating load on the database](https://github.com/Redislabs-Solution-Architects/rdi-quickstart-postgres?tab=readme-ov-file#generating-load-on-the-database)\n  to learn how to do this).\n- Run\n  [`redis-di describe`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-describe)\n  to see the flow of records. To watch it update live, pair the command with `watch`, for example\n  `watch -n 1 redis-di describe`.\n- Use [Redis Insight](https://redis.io/docs/latest/develop/tools/insight) to look at the data in the target database."
    }
  ],
  "examples": [
    {
      "id": "install-rdi-ex0",
      "language": "bash",
      "code": "curl -v -k -d '{\"eviction_policy\": \"noeviction\"}' \\\n    -u '<USERNAME>:<PASSWORD>' \\\n    -H \"Content-Type: application/json\" \\\n    -X PUT https://<CLUSTER_FQDN>:9443/v1/bdbs/<BDB_UID>",
      "section_id": "install-rdi"
    },
    {
      "id": "install-rdi-ex1",
      "language": "bash",
      "code": "curl -v -k -d '{\"data_persistence\":\"aof\"}' \\\n    -u '<USERNAME>:<PASSWORD>' \\\n    -H \"Content-Type: application/json\" \n    -X PUT https://<CLUSTER_FQDN>:9443/v1/bdbs/<BDB_UID>\n  curl -v -k -d '{\"aof_policy\":\"appendfsync-every-sec\"}' \\\n    -u '<USERNAME>:<PASSWORD>' \\\n    -H \"Content-Type: application/json\" \\\n    -X PUT https://<CLUSTER_FQDN>:9443/v1/bdbs/<BDB_UID>",
      "section_id": "install-rdi"
    },
    {
      "id": "create-context-ex0",
      "language": "bash",
      "code": "redis-di set-context <unique-context-name> --api-url https://<host> --user <user>",
      "section_id": "create-context"
    },
    {
      "id": "create-context-ex1",
      "language": "bash",
      "code": "redis-di use-context <context name>",
      "section_id": "create-context"
    },
    {
      "id": "deploy-the-pipeline-ex0",
      "language": "bash",
      "code": "redis-di deploy --dir <path to pipeline folder>",
      "section_id": "deploy-the-pipeline"
    }
  ]
}
