diff --git a/agents/available-connections.mdx b/agents/available-connections.mdx index 3ef79fe6..06928640 100644 --- a/agents/available-connections.mdx +++ b/agents/available-connections.mdx @@ -60,7 +60,7 @@ agent card for the full list. - +
+ +
+ MotherDuck + MotherDuck +
+ Serverless analytics platform powered by DuckDB +
+ + 1 tool + + + + Details + +
+ +
+ +
+ MotherDuck + MotherDuck +
+ Serverless analytics platform powered by DuckDB +
+ + 1 tool + + + + Details + +
+ +
+
+ MotherDuck +
+

MotherDuck

+

+ Serverless analytics platform powered by DuckDB +

+
+
+ +## Overview + +MotherDuck is a serverless analytics platform that combines the speed of DuckDB +with cloud convenience. This guide will walk you through connecting your +Hypermode agent to MotherDuck, enabling powerful data analytics, complex +queries, and insights generation using both your own data and MotherDuck's rich +sample datasets. + +## Prerequisites + +Before connecting MotherDuck to Hypermode, you'll need: + +1. A [MotherDuck account](https://motherduck.com/) +2. MotherDuck API token for authentication +3. A [Hypermode workspace](https://hypermode.com/) + +## Setting up MotherDuck + +### Step 1: Create your MotherDuck account + +If you haven't already, sign up for a MotherDuck account to access serverless +analytics capabilities. + +### Step 2: Access your workspace + +Once logged in, you'll see your MotherDuck workspace with access to: + +- Your personal databases +- Sample datasets (NYC Taxi, TPC-H, etc.) +- Query editor and analytics tools + +![MotherDuck workspace](/images/connections/motherduck/motherduck-workspace.png) + +### Step 3: Generate an API token + +Create an API token for secure access: + +1. Navigate to **Settings** → **Access Tokens** in your MotherDuck dashboard +2. Click **Create Token** +3. Give your token a descriptive name (for example, "Hypermode Integration") +4. Copy the generated token immediately + +![Create API token](/images/connections/motherduck/create-api-token-1.png) + + + Store your API token securely! You won't be able to see it again after + creation, and it provides full access to your MotherDuck workspace. + + +![Create API token](/images/connections/motherduck/create-api-token-2.png) + +## Creating your MotherDuck agent + +### Step 1: Create a new agent + +From the Hypermode interface, create a new agent manually: + +1. Click the agent dropdown menu +2. Select "Create new Agent" + +![Navigate to create agent](/images/connections/motherduck/create-new.png) + +### Step 2: Configure agent settings + +Use these recommended settings for your MotherDuck agent: + +- **Agent Name**: AnalyticsAgent +- **Agent Title**: Connects to MotherDuck Analytics +- **Description**: AnalyticsAgent performs data analysis and generates insights +- **Instructions**: You have a connection to MotherDuck and various other + developer tools to perform advanced analytics, generate insights, and answer + data questions. You can query large datasets, perform aggregations, and create + data visualizations. You have access to sample datasets including NYC Taxi + data, TPC-H benchmark data, and more. +- **Model**: GPT-4.1 + +![Create agent modal](/images/connections/motherduck/create-agent-details.png) + +### Step 3: View your agent profile + +Once created, navigate to your agent's settings page to see the profile: + +![Agent profile](/images/connections/motherduck/agent-profile-details.png) + +## Connecting to MotherDuck + +### Step 1: Add the MotherDuck connection + +Navigate to the **Connections** tab and add MotherDuck: + +1. Click "Add connection" +2. Select "MotherDuck" from the dropdown + +![Add MotherDuck connection](/images/connections/motherduck/add-motherduck-connection.png) + +### Step 2: Configure credentials + +Enter your MotherDuck credentials: + +- **API Token**: Your MotherDuck API token created in the previous step + +![MotherDuck connection modal](/images/connections/motherduck/motherduck-token.png) + +## Verifying the MotherDuck connection + +### Step 1: Test basic connectivity + +Start a new thread and test the connection with a simple query: + +```text +Can you show me what databases are available in my MotherDuck workspace? +``` + +You should see a MotherDuck tool call in the chat history, confirming the +connection works: + +![Test connection](/images/connections/motherduck/verify-connection.png) + +### Step 2: Explore sample datasets + +MotherDuck provides several built-in sample datasets. Test access to these: + +```text +What sample datasets are available in MotherDuck? Can you list the tables in the sample_data database? +``` + +![Explore sample data](/images/connections/motherduck/sample-data-description.png) + +### Step 3: Query sample data + +Test with a simple query on the NYC Taxi dataset: + +```text +Can you show me the first 5 rows from the NYC taxi dataset? +``` + +![Query sample data](/images/connections/motherduck/nyc-taxi-query.png) + +## Exploring built-in sample datasets + +### NYC taxi dataset + +MotherDuck includes the famous NYC Taxi trip data with millions of records: + +```text +Can you tell me about the NYC taxi dataset schema and show some interesting statistics? +``` + +**Example insights you can generate:** + +- Trip patterns by hour of day +- Popular pickup and drop off locations +- Revenue analysis by time periods +- Distance and duration correlations + +### TPC-H benchmark dataset + +Standard database benchmark data for testing analytical queries: + +```text +What's in the TPC-H dataset? Can you show me the customer and orders tables? +``` + +**Example analyses:** + +- Customer order patterns +- Regional sales performance +- Supplier analysis +- Revenue trends + +### Other sample datasets + +MotherDuck provides additional datasets for various use cases: + +```text +Are there any other interesting sample datasets I can explore for learning analytics? +``` + +## Setting up your data environment + +### Step 1: Understand available data + +Get familiar with the sample datasets and their schemas: + +```text +Can you give me a comprehensive overview of all sample datasets, including table schemas and relationships? +``` + +### Step 2: Create your own database (Optional) + +You can create your own databases alongside the sample data: + +```text +Can you create a new database called 'my_analytics' for my custom data? +``` + +### Step 3: Update agent instructions + +Enhance your agent's analytical capabilities by updating its instructions: + +```text +You are connected to MotherDuck with access to several rich sample datasets: + +1. **NYC Taxi Data** - Millions of taxi trip records with pickup/dropoff locations, fares, distances +2. **TPC-H Benchmark** - Standard business intelligence dataset with customers, orders, suppliers +3. **Additional sample datasets** - Various other datasets for analysis + +When performing analytics: +- Use appropriate SQL functions for time series analysis +- Leverage DuckDB's advanced analytical features +- Create meaningful aggregations and insights +- Consider geographical and temporal patterns in the data +- Use window functions for complex calculations + +Always explain your analytical approach and provide context for the insights you discover. +``` + +## Testing analytical operations + +### Test 1: Time series analysis + +Analyze taxi trip patterns over time: + +```text +Can you analyze NYC taxi trips by hour of the day and show me the busiest times? +``` + +### Test 2: Geospatial analysis + +Explore geographical patterns in the taxi data: + +```text +What are the most popular pickup locations in Manhattan? Can you rank them by trip volume? +``` + +### Test 3: Complex aggregations + +Perform advanced analytical queries: + +```text +Can you calculate the average fare per mile for different times of day and identify when rides are most expensive per mile? +``` + +### Test 4: Business intelligence queries + +Use the TPC-H dataset for business analysis: + +```text +Using the TPC-H dataset, can you show me the top 10 customers by total order value and their order patterns? +``` + +## What you can do + +With your MotherDuck connection established, your agent can: + +- **Perform complex analytics** on large datasets with DuckDB's speed +- **Generate business insights** from transactional and analytical data +- **Create data visualizations** and statistical summaries +- **Run time series analysis** on temporal data +- **Execute geospatial queries** for location-based insights +- **Perform machine learning prep** with feature engineering +- **Generate reports** with automated insights +- **Handle big data efficiently** with columnar processing +- **Integrate with other tools** for comprehensive data workflows + +## Advanced analytical capabilities + +### Window functions and analytical SQL + +MotherDuck supports advanced SQL features: + +```text +Can you calculate running totals and moving averages for taxi revenue by day? +``` + +### JSON and semi-structured data + +Handle complex data structures: + +```text +If I upload JSON data about user events, can you flatten and analyze it? +``` + +### Performance optimization + +Leverage DuckDB's columnar processing: + +```text +Can you show me query performance statistics for complex aggregations on the taxi dataset? +``` + +### Export and integration + +Export results for further use: + +```text +Can you create a summary table of taxi metrics by borough and export the results? +``` + +## Best practices + +1. **Query optimization**: Use appropriate filters and indexes for large + datasets +2. **Memory management**: Be mindful of result set sizes for complex queries +3. **Data exploration**: Start with small samples before running queries on full + datasets +4. **Performance monitoring**: Monitor query execution times and optimize + accordingly +5. **Data validation**: Verify data quality and handle null values appropriately + +## Sample analytical workflows + +### Transportation analytics + +```text +Analyze taxi demand patterns during major events or weather conditions using the NYC dataset +``` + +### Revenue optimization + +```text +Identify optimal pricing strategies by analyzing fare patterns across different routes and times +``` + +### Customer behavior analysis + +```text +Using TPC-H data, segment customers by purchasing behavior and lifetime value +``` + +### Operational efficiency + +```text +Calculate driver efficiency metrics using trip duration, distance, and revenue data +``` + +## Integration examples + +### Business reporting automation + +```text +Generate automated weekly reports on key performance indicators from multiple data sources +``` + +### Real-time analytics + +```text +Set up monitoring for data quality issues and anomaly detection in incoming data streams +``` + +### Data science workflows + +```text +Prepare and transform data for machine learning models using advanced SQL features +``` + +## Troubleshooting + +### Common connection issues + +1. **Invalid API token**: Verify your token is correct and hasn't expired +2. **Database access**: Ensure you have permissions for the databases you're + querying +3. **Query timeouts**: Large queries may timeout; consider adding `LIMIT` + clauses for testing +4. **Memory limits**: Very large result sets may hit memory constraints + +### Query performance + +1. **Use appropriate filters**: Always filter data when possible to reduce + processing +2. **Leverage indexes**: Take advantage of MotherDuck's automatic optimizations +3. **Monitor execution**: Check query plans for performance bottlenecks +4. **Batch operations**: For large data modifications, consider batching + +### Data quality issues + +1. **Handle nulls**: Always account for null values in calculations +2. **Data types**: Ensure proper data type handling in joins and calculations +3. **Duplicates**: Check for and handle duplicate records appropriately +4. **Outliers**: Identify and handle statistical outliers in your analysis + +## Learn more + +- [MotherDuck Documentation](https://motherduck.com/docs/) +- [DuckDB SQL Reference](https://duckdb.org/docs/sql/introduction) +- [Analytics Best Practices](https://motherduck.com/docs/guides/analytics) +- [Sample Dataset Documentation](https://motherduck.com/docs/sample-data) + + + Combine MotherDuck with other Hypermode connections to create powerful + data-driven workflows. For example, use Slack to share analytical insights, + GitHub to version control your analytical queries, or Stripe to combine + payment data with other business metrics for comprehensive reporting. + + +## Advanced analytics examples + +### Cohort analysis + +```text +Perform customer cohort analysis using the TPC-H dataset to understand customer retention patterns +``` + +### Seasonal trend analysis + +```text +Identify seasonal patterns in taxi usage and predict demand for different times of year +``` + +### A/B testing analysis + +```text +Design and analyze A/B tests using statistical functions to determine significance of results +``` + +### Predictive analytics preparation + +```text +Create features and prepare datasets for machine learning models to predict taxi demand or customer behavior +``` diff --git a/docs.json b/docs.json index e37ca886..a668dd8c 100644 --- a/docs.json +++ b/docs.json @@ -90,7 +90,8 @@ "pages": [ "agents/connections/supabase", "agents/connections/neo4j", - "agents/connections/mongodb" + "agents/connections/mongodb", + "agents/connections/motherduck" ] } ] diff --git a/images/agents/connections/icons/motherduck.png b/images/agents/connections/icons/motherduck.png new file mode 100644 index 00000000..02172a59 Binary files /dev/null and b/images/agents/connections/icons/motherduck.png differ diff --git a/images/connections/motherduck/add-motherduck-connection.png b/images/connections/motherduck/add-motherduck-connection.png new file mode 100644 index 00000000..d678c7a7 Binary files /dev/null and b/images/connections/motherduck/add-motherduck-connection.png differ diff --git a/images/connections/motherduck/agent-profile-details.png b/images/connections/motherduck/agent-profile-details.png new file mode 100644 index 00000000..3cc0409e Binary files /dev/null and b/images/connections/motherduck/agent-profile-details.png differ diff --git a/images/connections/motherduck/create-agent-details.png b/images/connections/motherduck/create-agent-details.png new file mode 100644 index 00000000..b6ab5ada Binary files /dev/null and b/images/connections/motherduck/create-agent-details.png differ diff --git a/images/connections/motherduck/create-api-token-1.png b/images/connections/motherduck/create-api-token-1.png new file mode 100644 index 00000000..f80a4564 Binary files /dev/null and b/images/connections/motherduck/create-api-token-1.png differ diff --git a/images/connections/motherduck/create-api-token-2.png b/images/connections/motherduck/create-api-token-2.png new file mode 100644 index 00000000..c6b451fb Binary files /dev/null and b/images/connections/motherduck/create-api-token-2.png differ diff --git a/images/connections/motherduck/create-new.png b/images/connections/motherduck/create-new.png new file mode 100644 index 00000000..9e030756 Binary files /dev/null and b/images/connections/motherduck/create-new.png differ diff --git a/images/connections/motherduck/motherduck-token.png b/images/connections/motherduck/motherduck-token.png new file mode 100644 index 00000000..2c0ffbca Binary files /dev/null and b/images/connections/motherduck/motherduck-token.png differ diff --git a/images/connections/motherduck/motherduck-workspace.png b/images/connections/motherduck/motherduck-workspace.png new file mode 100644 index 00000000..f8b50f30 Binary files /dev/null and b/images/connections/motherduck/motherduck-workspace.png differ diff --git a/images/connections/motherduck/nyc-taxi-query.png b/images/connections/motherduck/nyc-taxi-query.png new file mode 100644 index 00000000..52562f79 Binary files /dev/null and b/images/connections/motherduck/nyc-taxi-query.png differ diff --git a/images/connections/motherduck/sample-data-description.png b/images/connections/motherduck/sample-data-description.png new file mode 100644 index 00000000..b0dd8a19 Binary files /dev/null and b/images/connections/motherduck/sample-data-description.png differ diff --git a/images/connections/motherduck/verify-connection.png b/images/connections/motherduck/verify-connection.png new file mode 100644 index 00000000..f7e5bc1d Binary files /dev/null and b/images/connections/motherduck/verify-connection.png differ diff --git a/styles/config/vocabularies/general/accept.txt b/styles/config/vocabularies/general/accept.txt index ea9f4b85..327ef3ec 100644 --- a/styles/config/vocabularies/general/accept.txt +++ b/styles/config/vocabularies/general/accept.txt @@ -1,5 +1,6 @@ 8B [Aa]gentic +A/B Ahrefs Airtable [Aa]rticle @@ -54,11 +55,13 @@ Jira maxWidth (?i)mcp [Mm]odus +MotherDuck Nano [Nn]amespace [Nn]amespaces [Nn]nClassify Nomic +NYC OAuth [Oo]nboarding [Oo]perationalize @@ -74,6 +77,8 @@ Product Hunt [Tt]imeEnd [Tt]imeLog [Tt]riaging +TPC +TPC-H [Uu]nexported [Uu]psert [Uu]psertBatch