CLAIRE Copilot for Data Integration > Data Integration > Mapping examples
  

Mapping examples

Let's take a look at a few example prompts that you can use to create a mapping. You can create a mapping that writes data from a source to a target, or you can specify additional transformations to include in the data flow.
The following example prompts show the types of use cases and data flows that CLAIRE Copilot can configure in a mapping:
If you don't provide all the details that CLAIRE Copilot needs to create a mapping in the first prompt, CLAIRE Copilot asks you to provide them, such as source and target connections or source and target objects. If CLAIRE Copilot gives you a list of options for connections or objects to choose from, you can enter the name or number of the list item. Otherwise, you can type the name of the connection or object in the prompt text box.
For best results, provide as much detail as possible in the first prompt that you submit. For example, the following prompt specifies the source and target objects, source and target connections, and transformations to configure in the mapping:
Read 'DEPT_MAIN' from Oracle connection 'Oracle_connection', group the incoming data based on field 'DEPTNAME', and create a new field named 'MIN_SALARY' that has the minimum value of the 'SALARY' field and a field named 'AVE_SALARY' which has the average salary. Write the resulting data to a table named 'DEPT_P' in the same Oracle connection.

Prompt: Combine and extract data from Snowflake

Let's ask CLAIRE Copilot to combine and extract data from Snowflake. We'll specify the source objects and the source connection, the transformations, and the targets for CLAIRE Copilot to configure in the mapping.
  1. 1Enter the following prompt:
  2. Combine and extract data from table CODEDATABASE/CCP/EMPLOYEE_DETAILS and CODEDATABASE/CCP/EMPLOYEE_SALES using the connection SnowflakeAnalytics2. Lookup the region name from the CODEDATABASE/CCP/REGION_MASTER table based on region id. Filter only for employees in North America region. Aggregate the records by summing up the sales for each quarter for each Employee. Then create a full name for each employee and sort the data by Region. Route Q1, Q2, Q3 and Q4 records to new tables Q1_sales, Q2_sales, Q3_sales and Q4_sales respectively using the SnowflakeAnalytics2 connection.
  3. 2Click Yes.
  4. The following image shows the response from CLAIRE Copilot and the created mapping:
    The conversation window shows that CLAIRE Copilot processed the request to create the mapping. The mapping is open in the Mapping Designer.
  5. 3Resolve the validation errors in the mapping, if any, and then save and run the mapping.