Overview
Connecting Pylar to MotherDuck allows you to access and analyze your MotherDuck data directly from Pylar. MotherDuck is a serverless analytics platform, and connecting it to Pylar enables seamless data querying and analysis.Prerequisites
- ✅ Pylar account with Analyst role or higher
- ✅ MotherDuck account
- ✅ Access to MotherDuck service token
Step 1: Log in to MotherDuck
- Start by logging into your MotherDuck account
- Ensure you have access to account settings
Step 2: Retrieve Service Token
- Once logged in, click on your username in the upper right corner
- Go to “Settings”
- You will see a service token displayed
- Copy this token—you’ll need it to authenticate the connection with Pylar
Keep your service token secure. It provides access to your MotherDuck data. Never share it publicly or commit it to version control.
Step 3: Navigate to Pylar Connections
- Switch to your Pylar workspace
- Click on the “Connections” tab located in the sidebar
- You’ll see the list of available data sources
Step 4: Select MotherDuck Connector
From the list of available data sources, select “MotherDuck”. The connection setup screen will open.Step 5: Paste the Service Token
- You will be prompted to enter your service token
- Paste the token you copied from MotherDuck into the provided field
- Double-check that the token is complete and correct
The service token is a long string. Make sure you copy the entire token without any truncation.
Step 6: Confirm the Connection
- After pasting the service token, click on the “Confirm” button
- Pylar will validate the token and establish the connection
Step 7: Verify Connection
- You should now see that your MotherDuck account is connected to Pylar
- The connection will appear in your connections list
Querying Data from MotherDuck
Once connected, querying data is simple:Step 1: Go to Query Section
- Navigate to the query section in your Pylar workspace
- Open the SQL IDE
Step 2: Run a Query
Enter your SQL query to fetch data from MotherDuck:Step 3: View Results
Your query results will be displayed, showing how easy it is to access and analyze data from MotherDuck within Pylar.Troubleshooting
Issue: “Invalid token” error
Solutions:- Verify you copied the complete service token
- Check for any extra spaces or characters
- Ensure token hasn’t expired (regenerate if needed)
- Verify token has necessary permissions
Issue: Connection fails
Solutions:- Double-check service token is correct
- Regenerate token in MotherDuck if needed
- Verify MotherDuck account is active
- Check network connectivity
Issue: Data not appearing
Solutions:- Wait for indexing to complete
- Verify database and table names are correct
- Check service token has access to the data
- Review MotherDuck permissions
Best Practices
Token Security
- ✅ Keep service token secure
- ✅ Regenerate token if compromised
- ✅ Use dedicated tokens for Pylar
- ✅ Monitor token usage in MotherDuck
Connection Naming
- ✅ Use descriptive names:
motherduck_prod,motherduck_analytics - ✅ Include environment information
- ✅ Be consistent across your workspace
Next Steps
Now that MotherDuck is connected:- Creating Data Views - Create views using MotherDuck data
- Cross-Database Joins - Join MotherDuck with other sources
- Connection Security - Secure your connections
Create Views
Use your MotherDuck connection to create data views