CLAIRE Copilot for Data Integration > Using CLAIRE Copilot with Data Ingestion and Replication > Database Ingestion and Replication examples of creating a task
  

Database Ingestion and Replication examples of creating a task

Let's look at some examples of configuring a database ingestion and replication task in CLAIRE Copilot

Example: Create a database ingestion task for a combined load from SQL Server to PostgreSQL

You want to replicate data from a SQL Server database to a PostgreSQL database that you use as the primary data store for analytics.
First you need to perform a point-in-time initial load of data to the target and then switch to replicating DML changes in near real time continually to keep the target up to date. To do this, let's create a database ingestion and replication combined initial and incremental load task in CLAIRE Copilot.
CLAIRE Copilot asks you to choose the connections, runtime environment, and schemas that you didn't include in the prompt. It then creates the task.
  1. 1Open CLAIRE Copilot.
  2. 2In the context scope bar, make sure the selected context scope includes your SQL Server and PostgreSQL connections. If it doesn't, change or edit the context scope. In this example, the cdir3 context scope is selected.
  3. 3In the Ask CLAIRE box, type the following prompt, and then click Submit:
  4. Create a combined load task with a SQL Server source and a PostgreSQL target
  5. 4At the request for the target connection, type the name or number of the connection, or type @ to see all connections. The Ask CLAIRE box lists two connections for the target and asks you to choose one.
  6. In this example, Copilot lists two connections. Type 2 to select PostgreSQL_CDIR_3.
    Copilot confirms that PostgreSQL_CDIR_3 has been selected as your target connection.
  7. 5At the request for the source connection, type the name or number of the connection, or type @ to see all connections.
  8. The Ask CLAIRE box lists two connections for the source and asks you to choose one.
    In this example, type 2 to select SQLSERVER_CDIR.
    Copilot confirms that SQLSERVER_CDIR has been selected as your source connection.
  9. 6At the request for the runtime environment, click the card to view the available runtime environments. Then type the name or number of the runtime environment, or type @ to see a list of available runtime environments.
  10. In this example, Copilot found six runtime environments. Type Working_QA_Agent.
    A card lists six runtime environments, including Working_QA_Agent.
    Copilot confirms that Working_QA_Agent has been selected as your runtime environment.
    Copilot skips this step if you previously set a default runtime environment.
  11. 7At the request for the target schema, type the name or number of the schema, or type @ to see all target schemas.
  12. In this example, Copilot found two target schemas, public and test. Type test.
    The list of target schemas shows public and test.
    Copilot confirms that test has been selected as your target schema.
  13. 8At the request for the source schema, click the card to view the available schemas, and then type the name of the schema. Alternatively, type @ to see a list of available source schemas.
  14. A card lists the 22 source schemas, including dbo.
    In this example, Copilot found 22 source schemas. Type dbo.
    Copilot confirms that dbo has been selected as your source schema.
  15. 9At the request for the source tables or objects, type Select All to select all objects in the source schema.
  16. The Ask CLAIRE box asks which source tables or objects to use and explains how to enter selection rules.
    To select a subset, enter include or exclude rules with object names or wildcard patterns, such as Include prod*. Copilot applies the rules in the order you enter them.
    Copilot confirms that it applied the source table selection rules.
  17. 10Review the Database Ingestion and Replication Task Specification to confirm your settings.
  18. The task specification lists the connections, the combined load type, the runtime environment, the schemas, and the Include* source table rule.
  19. 11At the question about generating the task, click Yes and then click Submit.
  20. Copilot generates the task and displays the task name, a link to the task, and the project that contains it. In this example, the task is t_SQLS_Post_20261110130411 in the cdir3_demo project.
    The generated task appears with its name, a link to the task, and the cdir3_demo project.
  21. 12Click the link to open the task in the task configuration wizard.
  22. 13Verify the task definition.
  23. You can edit field values and set additional fields on the Task Details, Transform, and Let's Go pages. Toggle on Show Advanced Options to see all fields. Don't change the source and target connections. If you edit the task, save it. Otherwise, the task is ready to deploy.
  24. 14Deploy the task. You can then run it from My Jobs or another monitoring interface.

Example: Create a database ingestion task for a combined load from PostgreSQL to PostgreSQL

You want to load data from a PostgreSQL database to another PostgreSQL database that you use as the primary data store for analytics. You also want to keep the databases in sync to ensure up-to-date information for real-time analytics.
To do this, let's create a database ingestion and replication combined initial and incremental load task in CLAIRE Copilot. You already know the connection names, runtime environment, and schema names, so you include them in the first prompt to streamline the process.
  1. 1Open CLAIRE Copilot.
  2. 2In the context scope bar, make sure the selected context scope includes your PostgreSQL connections. If it doesn't, change or edit the context scope. In this example, the CDIR_Copilot_CS context scope is selected.
  3. 3In the Ask CLAIRE box, type the following prompt, and then click Submit:
  4. Create a database ingestion asset that performs a combined load using PostgreSQL as the source and PostgreSQL as the target. Connect to the source using the PostgreSQL_CDIR connection, and connect to the target using the PostgreSQL_CDIR connection. Run the asset on the Working_QA_Agent runtime environment. Read data from the test source schema and write data to the test target schema. Select all the tables.
    Copilot confirms that PostgreSQL_CDIR has been selected as your target and source connection. Copilot also confirms that Working_QA_Agent has been selected as your runtime environment.
    The Ask CLAIRE box shows the prompt and the confirmations for the connections and the runtime environment.
  5. 4At the request for the target schema, type the name or number of the schema, or type @ to see all target schemas.
  6. In this example, Copilot found two target schemas, public and test. Type 2.The list of target schemas shows public and test.
    Copilot confirms that test has been selected as your target schema.
    The confirmation shows that test is selected as the target schema.
  7. 5At the request for the source schema, type the name or number of the schema, or type @ to see all source schemas.
  8. In this example, Copilot found two source schemas, public and test. Type 2 to select test.
    The list of source schemas shows public and test.
    Copilot confirms that test has been selected as your source schema.
  9. 6Review the Database Ingestion and Replication Task Specification to confirm your settings, including the Combined load type and the Include* source table selection rule.
  10. The task specification lists PostgreSQL_CDIR as the source and target, the Combined load type, the runtime environment, the schemas, and the Include* rule.
  11. 7At the question about generating the task, click Yes and then click Submit.
  12. Copilot generates the task and displays the task name, a link to the task, and the project that contains it. In this example, the task is t_Post_Post_20261110060912 in the CDIR_Copilot_shruthi project.
    The generated task appears with its name, a link to the task, and the CDIR_Copilot_shruthi project.
  13. 8Click the link to open the task in the task configuration wizard.
  14. 9Verify the task definition.
  15. You can edit field values and set additional fields on the Task Details, Transform, and Let's Go pages. Toggle on Show Advanced Options to see all fields. Don't change the source and target connections. If you edit the task, save it. Otherwise, the task is ready to deploy.
  16. 10Deploy the task. You can then run it from My Jobs or another monitoring interface.