DataStar Quick Start: Macro Building with Ada

In this quick start guide we will walk through how you can build a DataStar macro for repeatable Cosmic Frog model building, where data needs to be refreshed periodically, through chatting with Ada.

When using Ada to have the Modeler Agent create a model, it is a non-deterministic process where you may not get the same results every time. Once you are happy with the model you have built using Ada, you want to be able to repeat those steps every time in a reliable, performant, deterministic fashion. That is the value of being able to persist the process in DataStar.

It is helpful to be familiar with the contents of the following Help Center articles prior to diving into this quick start:

Quick Start Steps

This quick start guide uses a historical shipments file that was also used in the Importing a CSV File quick start guide. In addition, we will create a second data connection for a basic costs file and import that one into the Project Sandbox too. We then use the data in those 2 files to populate tables of an initially empty Cosmic Frog model with the aim to run a Neo solve. Finally, the steps to populate this model are automatically captured in a DataStar macro to create a repeatable model build workflow. In summary the steps are:

  1. Create 2 data connections in DataStar, for the 2 CSV files contained in this zip-file. The 2 files contain historical shipment and basic cost data.
  2. Create a new project in DataStar, add a macro to it, and import the data from the 2 connections in bullet 1 into the project sandbox.
  3. Create a new empty Cosmic Frog model.
  4. Chat with Ada in the next generation Optilogic platform to populate the Cosmic Frog model and simultaneously create a DataStar macro capturing the model build steps.
  5. Review the Cosmic Frog model and DataStar macro.
  6. Iterate on any model changes as needed, while keeping the DataStar macro updated.

Data and Initial Steps

We will cover what is contained in the 2 CSV files and steps 1-3 in this section.

Data

The next 2 screenshots show the structure of the data in the 2 CSV files used in this quick start.

Of the Historical_Shipments.csv file, the first 5 of a total of 42,656 records are shown. The Ship Dates range from May 2024 through August 2025:

The next 2 screenshots show all data contained in the Basic_Costs.csv file:

Initial Steps

  1. Create a new project in DataStar, giving it your desired name; we used “DS Macro by Ada to Build CF Model”.
  2. Refer to the DataStar Quick Start: Importing a CSV File article on how to create Data Connections and Import tasks for the 2 CSV files. Once the macro with the 2 Import tasks is set up, run it:
  1. Refer to the Creating a New Model section of the Creating and Managing Models article on how to create a new empty Cosmic Frog model. You can use your preferred model name; in this example we used “CF Model by DS Macro by Ada".

Chat with Ada

Now, we move on to chatting with Ada in the next generation Optilogic platform at https://ai.optilogic.app. Here, we will walk-through an initial prompt and the back and forth that follows. Note that you can get different responses and clarifying questions from Ada, even with the same starting data and initial prompt.

We first connect the DataStar project and empty Cosmic Frog model in the Databases drop-down selector, and then submit our prompt:

  1. We leave the interaction stye at the default of Scout. For an explanation of the options here, please see the Create Your First Prompt section in the Getting Started with Ada & Agentic AI documentation.
  2. From the Databases drop-down, we connect the empty Cosmic Frog model we just created, “CF Model by DS Macro by Ada”, and the DataStar project named “DS Macro by Ada to Build CF Model”, which contains the data of the imported CSV files.
  3. Since our aim is to build a Cosmic Frog model, we choose the ModelerAgent from the agents drop-down list. See the section linked under the first bullet to learn more about when to use which agent.
  4. The prompt we are submitting reads: “Using the 2 tables in the DataStar project, populate the tables in the connected Cosmic Frog model with the goal to run a NEO solve which can be used to optimize my outbound distribution assignments based on production and transportation costs, aligning each customer to their optimal distribution center. Note to:
    • 1) Use only data from July 2024 through June 2025.
    • 2) Add and geocode a Factory in Raleigh, NC, USA, where the 2 products are manufactured.
    • 3) Persist the steps in DataStar in a new macro called “Model Build”.”
  5. Once the prompt has been entered, hit the Enter key or click on the submit icon to submit it to Ada.

Ada comes back with three consecutive clarifying questions, 1 on model configuration decisions and 2 to approve running the DataStar macro and a Neo solve on the Cosmic Frog model. You can see the questions and the user’s responses in this screenshot:

Ada’s response is then as follows:

So, this achieved what we set out to do in the prompt. We did not yet run the Neo solve as we first want to examine the Cosmic Frog model and DataStar macro.

Review Cosmic Frog Model and DataStar Macro

In DataStar, we see that in addition to the macro that imports the data from the 2 CSV files, there is now a Model Build macro present too. Note that you may need to refresh your browser to see the new macro in case the project was still open from before. You can click on any task to select it and inspect its configuration which comes up on the right-hand side.

Opening the model in Cosmic Frog, we see that the expected tables are populated. Here, the Facilities table is shown with the 7 DCs and 1 (geocoded) Factory, as we requested:

All tables look good, except:

  1. The Model Settings table has model start and end date set to January 1, 2025, and December 31, 2025, respectively.
  2. The Unit Cost values for the Factory-DC lanes on the Transportation Policies table look to be of the right order of magnitude, however, we are unsure how the distances used to calculate these costs (unit cost = per mile cost * distance / average shipment size) were derived:

Iterate on Model and Macro

To understand the distance calculation and correct the model horizon, we continue our conversation with Ada:

As a result of the last prompt Ada updates the build_transportationpolicies Run SQL task in the Model Build macro, which we can see by opening its SQL Script:

In addition, she adds 2 tasks to the Model Build macro to take care of setting the model start and end date in the Model Settings table:

Double-checking the Cosmic Frog model to ensure the updated macro was run and results in the desired changes, we can see that the Unit Costs on the Factory-DC lanes have increased by 17% and that the Model Settings table now has Model Start Date and Model End Date set correctly.

Now we have created a repeatable, deterministic workflow in DataStar to build a basic Neo model from the 2 input files, which may be refreshed with newer data regularly.

Example Prompts

To get an idea of the types of interactions you can have with Ada while working on DataStar projects, here are some example prompts to get you started:

  1. What does the "Profile Data” macro in the connected DataStar project do?
  2. Explain the logic of how transportation policies are created in the "Build Policies Tables” macro in the connected DataStar project.
  3. What macros are present in the connected DataStar project? Summarize what each macro does.
  4. When was the last successful run of the "Clean raw data” macro in the connected DataStar project? How long did it take and what resource size was used?
  5. How often was each macro in the connected DataStar project run and how often did each fail?
  6. Update all Export tasks in the "Model Build” macro in the connected DataStar project so that the Destination Connection is changed to the connected "Global Supply Chain Strategy” Cosmic Frog model, while keeping mappings and destination tables unchanged.
  7. Add a task or multiple tasks to the "EMEA Greenfield” macro in the connected DataStar project. The task(s) need to create unique facility candidates from the 3 “shipment_...” tables.
  8. Run the “Cleanse Data” macro in the connected DataStar project. If it completes successfully, also run the “Model Build” macro.
  9. In the connected Cosmic Frog model, copy all records in the Customer Demand table and paste them back in as a second set with following changes: 1) Status = Exclude, 2) Notes = Next year demand, 3) increase the quantity by 10% for all A_ finished goods, by 5% for all B_ finished goods, and by 2% for all C_ finished goods. Create a “Second Demand Set” macro in the connected DataStar project that performs these same changes.

Helpful Resources

As always, please do not hesitate to reach out to our Support team via support@optilogic.com in case of questions or feedback.

In this quick start guide we will walk through how you can build a DataStar macro for repeatable Cosmic Frog model building, where data needs to be refreshed periodically, through chatting with Ada.

When using Ada to have the Modeler Agent create a model, it is a non-deterministic process where you may not get the same results every time. Once you are happy with the model you have built using Ada, you want to be able to repeat those steps every time in a reliable, performant, deterministic fashion. That is the value of being able to persist the process in DataStar.

It is helpful to be familiar with the contents of the following Help Center articles prior to diving into this quick start:

Quick Start Steps

This quick start guide uses a historical shipments file that was also used in the Importing a CSV File quick start guide. In addition, we will create a second data connection for a basic costs file and import that one into the Project Sandbox too. We then use the data in those 2 files to populate tables of an initially empty Cosmic Frog model with the aim to run a Neo solve. Finally, the steps to populate this model are automatically captured in a DataStar macro to create a repeatable model build workflow. In summary the steps are:

  1. Create 2 data connections in DataStar, for the 2 CSV files contained in this zip-file. The 2 files contain historical shipment and basic cost data.
  2. Create a new project in DataStar, add a macro to it, and import the data from the 2 connections in bullet 1 into the project sandbox.
  3. Create a new empty Cosmic Frog model.
  4. Chat with Ada in the next generation Optilogic platform to populate the Cosmic Frog model and simultaneously create a DataStar macro capturing the model build steps.
  5. Review the Cosmic Frog model and DataStar macro.
  6. Iterate on any model changes as needed, while keeping the DataStar macro updated.

Data and Initial Steps

We will cover what is contained in the 2 CSV files and steps 1-3 in this section.

Data

The next 2 screenshots show the structure of the data in the 2 CSV files used in this quick start.

Of the Historical_Shipments.csv file, the first 5 of a total of 42,656 records are shown. The Ship Dates range from May 2024 through August 2025:

The next 2 screenshots show all data contained in the Basic_Costs.csv file:

Initial Steps

  1. Create a new project in DataStar, giving it your desired name; we used “DS Macro by Ada to Build CF Model”.
  2. Refer to the DataStar Quick Start: Importing a CSV File article on how to create Data Connections and Import tasks for the 2 CSV files. Once the macro with the 2 Import tasks is set up, run it:
  1. Refer to the Creating a New Model section of the Creating and Managing Models article on how to create a new empty Cosmic Frog model. You can use your preferred model name; in this example we used “CF Model by DS Macro by Ada".

Chat with Ada

Now, we move on to chatting with Ada in the next generation Optilogic platform at https://ai.optilogic.app. Here, we will walk-through an initial prompt and the back and forth that follows. Note that you can get different responses and clarifying questions from Ada, even with the same starting data and initial prompt.

We first connect the DataStar project and empty Cosmic Frog model in the Databases drop-down selector, and then submit our prompt:

  1. We leave the interaction stye at the default of Scout. For an explanation of the options here, please see the Create Your First Prompt section in the Getting Started with Ada & Agentic AI documentation.
  2. From the Databases drop-down, we connect the empty Cosmic Frog model we just created, “CF Model by DS Macro by Ada”, and the DataStar project named “DS Macro by Ada to Build CF Model”, which contains the data of the imported CSV files.
  3. Since our aim is to build a Cosmic Frog model, we choose the ModelerAgent from the agents drop-down list. See the section linked under the first bullet to learn more about when to use which agent.
  4. The prompt we are submitting reads: “Using the 2 tables in the DataStar project, populate the tables in the connected Cosmic Frog model with the goal to run a NEO solve which can be used to optimize my outbound distribution assignments based on production and transportation costs, aligning each customer to their optimal distribution center. Note to:
    • 1) Use only data from July 2024 through June 2025.
    • 2) Add and geocode a Factory in Raleigh, NC, USA, where the 2 products are manufactured.
    • 3) Persist the steps in DataStar in a new macro called “Model Build”.”
  5. Once the prompt has been entered, hit the Enter key or click on the submit icon to submit it to Ada.

Ada comes back with three consecutive clarifying questions, 1 on model configuration decisions and 2 to approve running the DataStar macro and a Neo solve on the Cosmic Frog model. You can see the questions and the user’s responses in this screenshot:

Ada’s response is then as follows:

So, this achieved what we set out to do in the prompt. We did not yet run the Neo solve as we first want to examine the Cosmic Frog model and DataStar macro.

Review Cosmic Frog Model and DataStar Macro

In DataStar, we see that in addition to the macro that imports the data from the 2 CSV files, there is now a Model Build macro present too. Note that you may need to refresh your browser to see the new macro in case the project was still open from before. You can click on any task to select it and inspect its configuration which comes up on the right-hand side.

Opening the model in Cosmic Frog, we see that the expected tables are populated. Here, the Facilities table is shown with the 7 DCs and 1 (geocoded) Factory, as we requested:

All tables look good, except:

  1. The Model Settings table has model start and end date set to January 1, 2025, and December 31, 2025, respectively.
  2. The Unit Cost values for the Factory-DC lanes on the Transportation Policies table look to be of the right order of magnitude, however, we are unsure how the distances used to calculate these costs (unit cost = per mile cost * distance / average shipment size) were derived:

Iterate on Model and Macro

To understand the distance calculation and correct the model horizon, we continue our conversation with Ada:

As a result of the last prompt Ada updates the build_transportationpolicies Run SQL task in the Model Build macro, which we can see by opening its SQL Script:

In addition, she adds 2 tasks to the Model Build macro to take care of setting the model start and end date in the Model Settings table:

Double-checking the Cosmic Frog model to ensure the updated macro was run and results in the desired changes, we can see that the Unit Costs on the Factory-DC lanes have increased by 17% and that the Model Settings table now has Model Start Date and Model End Date set correctly.

Now we have created a repeatable, deterministic workflow in DataStar to build a basic Neo model from the 2 input files, which may be refreshed with newer data regularly.

Example Prompts

To get an idea of the types of interactions you can have with Ada while working on DataStar projects, here are some example prompts to get you started:

  1. What does the "Profile Data” macro in the connected DataStar project do?
  2. Explain the logic of how transportation policies are created in the "Build Policies Tables” macro in the connected DataStar project.
  3. What macros are present in the connected DataStar project? Summarize what each macro does.
  4. When was the last successful run of the "Clean raw data” macro in the connected DataStar project? How long did it take and what resource size was used?
  5. How often was each macro in the connected DataStar project run and how often did each fail?
  6. Update all Export tasks in the "Model Build” macro in the connected DataStar project so that the Destination Connection is changed to the connected "Global Supply Chain Strategy” Cosmic Frog model, while keeping mappings and destination tables unchanged.
  7. Add a task or multiple tasks to the "EMEA Greenfield” macro in the connected DataStar project. The task(s) need to create unique facility candidates from the 3 “shipment_...” tables.
  8. Run the “Cleanse Data” macro in the connected DataStar project. If it completes successfully, also run the “Model Build” macro.
  9. In the connected Cosmic Frog model, copy all records in the Customer Demand table and paste them back in as a second set with following changes: 1) Status = Exclude, 2) Notes = Next year demand, 3) increase the quantity by 10% for all A_ finished goods, by 5% for all B_ finished goods, and by 2% for all C_ finished goods. Create a “Second Demand Set” macro in the connected DataStar project that performs these same changes.

Helpful Resources

As always, please do not hesitate to reach out to our Support team via support@optilogic.com in case of questions or feedback.

Have More Questions?

Contact Support

Get in touch

Contact Sales

Get in touch

Visit Frogger Pond Community

Visit our Community