Using the Data Agent to configure the database

Viewing the SQL or JavaScript for a Data Agent action

From the chat, flags SQL and JavaScript that it creates. Can view the content.

To complete an action to the database, the Data Agent generates either SQL or JavaScript.

In the chat window, the Data Agent uses icons to identify actions that generated SQL or JavaScript.

To view the content of the SQL or JavaScript, click the dropdown icon for the action. To copy the SQL or JavaScript, click the copy icon.

Displaying the generated SQL for a step
Displaying the generated JavaScript for a step

Prompting the Data Agent to change the database

After you create the initial version of a Data Agent database, you use the Data Agent to make adjustments to the database structure and the data values.

For example, the Data Agent might create email addresses that all use a single fake email domain. For more realistic data, you can prompt the Data Agent to change the email addresses to use real personal and commercial email domains.

Or you might ask the Data Agent to add new columns or tables.

Uploading files to the Data Agent

To provide information for the Data Agent to work from, you can upload files.

A file might, for example, contain the schema to use (Add a table that uses the attached schema). Examples of schema files include:

  • SQL DDL scripts

  • prisma.schema scripts

  • Swagger YAML API definitions

Or it might contain a set of example values (Add a job title column that uses the attached list of values).

You can also upload .jpg and .png images. For example, you might upload an image to show the structure of an invoice form that the Data Agent populates from the data.

To upload files to the Data Agent, either:

  • Drag and drop the files to the Data Agent.

  • Click the attachment icon, then search for and select the files.

Data Agent chat prompt with the attachment icon highlighted

Copy the text of a Data Agent response

You can copy the content of any Data Agent response. For example, you might want to use the Data Agent summary of its actions in another document.

To copy any response, hover over the response text, then click the copy icon at the bottom right of the response.

Copy option for a Data Agent response

Reverting a change

If a change produces unexpected results, you can provide another prompt to fix the issue.

You can also revert a change and then try again.

To revert a change, in the Data Agent chat:

  1. Hover over the prompt that initiated the change.

Revert option for an action to a Data Agent database
  1. Click the revert icon.

  2. Confirm that you want to revert the change. The Data Agent reverts the change. It redisplays the prompt so that you can make adjustments to it.

Last updated