New to semantic modeling? See What is a Semantic Layer? to understand the concepts, or the Malloy Language Documentation for language details.
Prerequisites
- VS Code with Credible extension configured - See Set Up Your IDE
- Database connection established - See Connect a Database
Build a Model with the AI Agent
- Open the Credible Chat panel in VS Code
-
Describe what you want to model - Be specific about your data and analysis goals
Examples:
- “Build a model of my ecommerce data so I can analyze sales by product and brand”
- “Create a semantic model for customer analytics including lifetime value”
- “Model the orders table with customer and product relationships”
- Follow the agent’s prompts and review the generated model in your editor
- Accept the model - Click Tab or Accept to apply the proposed model to your file
- Sources connected to your tables
- Joins between related tables
- Dimensions for grouping and filtering
- Measures for calculations and aggregations
Working with the Agent
Beyond initial model creation, you can use the Credible modeling agent to:- Create views - Ask the agent to create views (saved queries) in your model. The agent will create and compile the query so you can see the analysis.
- Edit existing code - Highlight a section of your model and ask the agent to modify it.
- Learn Malloy - Ask the agent questions about the Malloy language (e.g., “How do I write date filters in Malloy?”)
Validate as You Build
Use the buttons above each source in VS Code to validate your model:- Schema - View the compiled structure of your source
- Explore - Open the Data Explorer to interactively query
- Preview - Quick data preview to verify connections