Hi All, I am new to MotherDuck and My webapps are hosted on Heroku and using postgresql database. I am developing inhouse reporting system and has millions of rows in database. I want to use MotherDuck for reporting. Can anybody help me with documentation using which I can create reports using MotherDuck. I am also using Claud and configured MotherDuck extension in it. Can I integrate MotherDuck in my application so that user don't have to go to Claud and can create Dives from my app ? Thank you!! cc Adam E. Nathaniel T. Mehdi O.
hi! Do you want to replace your postgres database with MotherDuck, or are you looking to keep PG and ingest it's data into MotherDuck for the reporting use cases?
Ok! I'll share some high level guidance, documentation references and answer your direct questions. I think your team has a call already scheduled with our team for next week to go over in detail about how to accomplish what you're looking to do (?) In any case, very happy to answer any follow-up questions right now ๐ The first step would be to get the data into motherduck. "Millions of rows" is not that much volume nowadays, depends on how many millions and the size of each record.
The simplest approach would be to replicate the full PG database to MotherDuck periodically, like documented on motherduck.com/docs/cookbook/flight-postgres-ingest
If full copies of the database are too heavy, you'll need to use a pipeline that incrementally replicates the data, e.g. motherduck.com/docs/cookbook/dlt-db-replication
Then you could optionally transform the raw data from postgres into other tables, or build your reports directly from the postgres-shaped data. To create the reports, it seems like you're looking to embed dives into your own application? The general docs about that are here: motherduck.com/docs/key-tasks/dives and motherduck.com/docs/key-tasks/dives/embedding-dives For your users editing Dives:
Can I integrate MotherDuck in my application so that user don't have to go to Claud and can create Dives from my app ?
Dives under the hood are front-end JS code with functions that can call MD to get the data to visualize. So they can be created by manually writing the code, using agents, or by having static or parametrized Dives that are generated by your application. The functions that are available to interact with Dive content programatically are documented here: motherduck.com/docs/sql-reference/motherduck-sql-reference/dives
Same to you!! ๐
.png)