A powerful Streamlit application that generates tailored demo data infrastructure for Snowflake's Cortex Analyst and Cortex Search services. Create realistic, AI-powered demo environments in minutes with custom data that matches your customer's industry and use cases.
The SI Data Generator creates complete demo environments that showcase Snowflake's AI capabilities:
- ๐ค AI-Generated Demo Ideas: Uses Cortex LLM to create 3 tailored demo scenarios based on customer information
- ๐ Realistic Structured Data: Generates business-relevant tables with proper relationships and constraints
- ๐ Searchable Unstructured Data: Creates text chunks optimized for semantic search
- ๐ Semantic Views: Builds AI-ready views with relationships for Cortex Analyst
- ๐ Cortex Search Services: Configures semantic search services for document retrieval
- Customer-Specific: Tailors demos based on company URL, team members, and use cases
- Industry-Aware: Generates relevant scenarios for e-commerce, healthcare, financial services, etc.
- AI-Powered: Uses Snowflake Cortex LLM to create realistic business contexts
- Structured Tables: 2 tables with PRIMARY KEY constraints and realistic business data
- Unstructured Content: Searchable text chunks with metadata
- Joinable Architecture: All tables connect via ENTITY_ID for comprehensive analytics
- Semantic Views: AI-ready views with synonyms, relationships, and example queries
- Automated Schema Creation: Creates organized database schemas
- Proper Constraints: PRIMARY KEY constraints for optimal join performance
- Cortex Integration: Ready-to-use Cortex Search services
- Comprehensive Documentation: Generated demo guides and example queries
SI_DEMOS (Database)
โโโ APPLICATIONS (Schema)
โ โโโ SI_DATA_GENERATOR_REPO (Git Repository)
โ โโโ SI_DATA_GENERATOR_APP (Streamlit App)
โโโ [COMPANY]_DEMO_[DATE] (Generated Demo Schemas)
โโโ TABLE_1 (Structured data with ENTITY_ID PK)
โโโ TABLE_2 (Structured data with ENTITY_ID PK)
โโโ CONTENT_CHUNKS (Unstructured searchable text)
โโโ [COMPANY]_SEMANTIC_VIEW (AI-ready view)
โโโ [TABLE]_SEARCH_SERVICE (Cortex Search)
- Snowflake Account with ACCOUNTADMIN privileges
- Cortex Access enabled in your Snowflake account
- Streamlit feature enabled
- Git Integration capabilities
-- Execute the complete setup script
-- File: Setup.sql
-- This creates the entire environment including:
-- - Database and schemas
-- - Roles and permissions
-- - Git integration
-- - Streamlit application
- Navigate to Data > Streamlit Apps in Snowsight
- Open
SI_DATA_GENERATOR_APP
fromSI_DEMOS.APPLICATIONS
- Start generating demos!
Enter:
- Company URL: Customer's website (e.g.,
https://acme.com
) - Team Members: Who you're presenting to (e.g., "CTO, Data Team")
- Use Cases: Specific requirements (optional)
- Record Count: Number of sample records per table
- Click "Generate Demo Ideas"
- App uses Cortex LLM to create 3 tailored scenarios
- Each demo includes:
- Compelling title and description
- Industry focus and business value
- 2 structured tables + 1 unstructured table
- Purpose and use case explanations
- Review the 3 AI-generated demo ideas
- Each shows:
- Structured Table 1: Primary business data
- Structured Table 2: Supporting/related data
- Unstructured Table: Searchable content
- Select the best fit for your customer
- Choose schema name (auto-generated)
- Enable optional features:
- Semantic View: AI-ready analytics view
- Cortex Search Service: Semantic search capability
- Click "Create Demo Infrastructure"
The app creates:
- โ Database Schema with organized structure
- โ Structured Tables with realistic data and PRIMARY KEY constraints
- โ Unstructured Table with searchable text chunks
- โ Semantic View with relationships and example queries
- โ Cortex Search Service for document retrieval
- โ Complete Documentation with demo flow and example questions
- Tables: Sales transactions, customer profiles
- Search: Product reviews and feedback
- Queries: "What are our top-performing customer segments by revenue?"
- Tables: Transaction monitoring, compliance events
- Search: Regulatory documents and policies
- Queries: "Show me high-risk transactions and their compliance status"
- Tables: Patient outcomes, treatment protocols
- Search: Clinical notes and research documentation
- Queries: "Which treatment protocols have the best patient outcomes?"
Question: "What are the top 5 performing entities and their key metrics?"
โ Cortex Analyst queries structured tables
โ Joins data using ENTITY_ID relationships
โ Returns analytical insights with visualizations
Question: "What could be the reasons for these performance differences?"
โ Agent uses AI reasoning (not data querying)
โ Provides business insights and hypotheses
โ Suggests potential factors and correlations
Question: "Find relevant best practices for improving these metrics"
โ Cortex Search queries unstructured content
โ Returns contextual information from text data
โ Combines with previous analysis for complete insights
- Realistic Business Data: Industry-relevant columns and values
- PRIMARY KEY Constraints: ENTITY_ID for optimal joins
- 70% Data Overlap: Meaningful relationships between tables
- Proper Data Types: NUMBER, STRING, DATE, TIMESTAMP, BOOLEAN
- Business Context: Relevant to customer's industry
- Chunked Text: Optimized for semantic search
- Rich Metadata: Document types, sources, timestamps
- Searchable Attributes: CHUNK_ID, DOCUMENT_ID, DOCUMENT_TYPE
- Realistic Content: Business-relevant text samples
- AI-Ready Relationships: Properly defined joins
- Business Synonyms: Multiple ways to reference data
- Example Queries: Pre-built questions for demos
- Cortex Analyst Extension: Enhanced AI capabilities
Modify fallback demo ideas in the application:
def get_fallback_demo_ideas(company_name, team_members, use_cases):
# Add your custom industry templates
# Healthcare, Finance, Retail, Manufacturing, etc.
- Record Counts: 20 to 10,000 records per table
- Industry Focus: Automatic detection from company URL
- Use Case Tailoring: Custom scenarios based on requirements
-- Scale warehouse based on usage
ALTER WAREHOUSE SI_DEMO_WH SET WAREHOUSE_SIZE = 'X-SMALL';
- Rapid Demo Setup: Create tailored demos in minutes
- Customer-Specific: Relevant to prospect's industry
- Complete Infrastructure: Ready-to-use AI capabilities
- Professional Presentation: Polished, realistic data
- Best Practices: Proper constraints and relationships
- AI Integration: Cortex Analyst and Search examples
- Scalable Architecture: Easy to extend and modify
- Documentation: Complete setup and usage guides
- Real-World Scenarios: Relevant to their business
- AI Capabilities: See both analytics and search in action
- Immediate Value: Understand capabilities through familiar data
- Future-Ready: Architecture supports growth and expansion
-- List all demo schemas
SHOW SCHEMAS IN DATABASE SI_DEMOS LIKE '%_DEMO_%';
-- Remove specific demo
DROP SCHEMA IF EXISTS SI_DEMOS.ACME_DEMO_20250115;
- Compute Costs: Monitor warehouse usage
- Storage: Track table sizes in demo schemas
- Cortex: Review AI function call costs
"Insufficient privileges" Error
USE ROLE ACCOUNTADMIN;
-- Re-run setup script
"Cortex function not accessible" Error
GRANT USAGE ON FUNCTION SNOWFLAKE.CORTEX.COMPLETE(STRING, STRING)
TO ROLE ACCOUNTADMIN;
"Streamlit app not loading"
- Verify git repository is synced
- Check file path in app definition
- Ensure all permissions are granted
NATIVE_APP_PROVIDER_GUIDE.md
: Complete guide for Native App providers (installation, testing, releases)Setup.sql
: Automated environment creation for standalone deployment- Generated Demo Guides: Custom documentation for each demo
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
"This tool has revolutionized our demo process. We can now create customer-specific demos in minutes instead of hours, and the AI-generated scenarios are incredibly realistic and relevant." - Sales Engineering Team
"The semantic views and Cortex Search integration make it easy to showcase the full power of Snowflake's AI capabilities. Our customers immediately understand the value." - Solutions Architect
Ready to create amazing Snowflake demos? ๐
Native App Provider Guide | Standalone Setup Script | Report Issues