{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/quick-start-guide",
  "title": "Quickstart",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/quick-start-guide/",
  "summary": "Get started with a simple pipeline example",
  "content": "\nIn 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.\n\n## Prerequisites\n\n- 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\n\n## Overview\n\nThe following diagram shows the structure of the pipeline we will create (see\nthe [architecture overview](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/architecture#overview) to learn how the pipeline works):\n\n![images/rdi/ingest/ingest-qsg.webp](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.\n\n### Install PostgreSQL\n\nWe 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.\n\n### Install RDI\n\nInstall RDI using the instructions in the\n[VM installation guide](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/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  ```bash\n  curl -v -k -d '{\"eviction_policy\": \"noeviction\"}' \\\n    -u '\u003cUSERNAME\u003e:\u003cPASSWORD\u003e' \\\n    -H \"Content-Type: application/json\" \\\n    -X PUT https://\u003cCLUSTER_FQDN\u003e:9443/v1/bdbs/\u003cBDB_UID\u003e\n  ```\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  ```bash\n  curl -v -k -d '{\"data_persistence\":\"aof\"}' \\\n    -u '\u003cUSERNAME\u003e:\u003cPASSWORD\u003e' \\\n    -H \"Content-Type: application/json\" \n    -X PUT https://\u003cCLUSTER_FQDN\u003e:9443/v1/bdbs/\u003cBDB_UID\u003e\n  curl -v -k -d '{\"aof_policy\":\"appendfsync-every-sec\"}' \\\n    -u '\u003cUSERNAME\u003e:\u003cPASSWORD\u003e' \\\n    -H \"Content-Type: application/json\" \\\n    -X PUT https://\u003cCLUSTER_FQDN\u003e:9443/v1/bdbs/\u003cBDB_UID\u003e\n  ```\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  If the **Database clustering** option is checked when you create the RDI database (as shown below),\n  you must *uncheck* it before proceeding.\n\n  ![images/rdi/ingest/RDIClusterSetting.webp](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  Redis Enterprise console. The **Database clustering** option should be set to **None**,\n  as shown in the following screenshot:\n\n  ![images/rdi/ingest/RDICheckUnclustered.webp](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  clustering disabled before continuing with the RDI installation.\n\n\n### Prepare the pipeline\n\nDuring 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/1.19.1/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\n### Create a context (optional) {#create-context}\n\nTo manage and inspect RDI, you can use the\n[`redis-di`](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/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/1.19.1/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```bash\nredis-di set-context \u003cunique-context-name\u003e --api-url https://\u003chost\u003e --user \u003cuser\u003e\n```\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/1.19.1/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/1.19.1/reference/cli/redis-di-use-context)\nto activate it:\n\n```bash\nredis-di use-context \u003ccontext name\u003e\n```\n\nThere are also subcommands to\n[list](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/reference/cli/redis-di-list-contexts)\nand [delete](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/reference/cli/redis-di-delete-context)\ncontexts.\n\n### Deploy the pipeline\n\nYou can deploy the pipeline with the following command:\n\n```bash\nredis-di deploy --dir \u003cpath to pipeline folder\u003e\n```\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/1.19.1/data-pipelines/deploy)\nfor more information about deployment settings.\n\n### View RDI's response to data changes\n\nOnce 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/1.19.1/architecture#overview)\nand the\n[ingest pipeline lifecycle](https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/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/1.19.1/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.\n",
  "tags": ["redis-di"],
  "last_updated": "2026-09-19T17:55:58-07:00"
}
