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:
•Copy all data from ProductIO table in Salesforce custom table to a file.
•Find the total salary of each department from the Aggregator_source file and write it to a different file.
•I want to identify all the team members for each account in AccountHistory table and write it to a file. The team member details are present in the Account Team member custom object in Salesforce.
•I want to get the vehicles details from the Vehicle__c object in Salesforce for the vehicles which were delivered in the last week from yesterday and move it to a service plan prepare file.
•Identify the rows log entries where the statuscode is 200 or 201. Separate them to a folder 1 and the keep the remaining rows in folder 2.
•Create 2 copies of the latest manifest file data for esl transaction files to audit/target/esl_transactions/ and source/billing/esl_transactions/. Add a new column with the system timestamp and arrange the data based on the transaction ids from the earliest to the latest.
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.
1Enter the following prompt:
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.
2Click Yes.
The following image shows the response from CLAIRE Copilot and the created mapping:
3Resolve the validation errors in the mapping, if any, and then save and run the mapping.