It's already been there for a while: https://github.com/beancount/beancount/blob/master/beancount/scripts/sql.py
The problem is that one still needs to aggregate positions together by currency and cost and so on, so it's difficult to use a regular database unless you have everything in a single currency. Otherwise we'd already be using an existing SQL database... On Sat, Jun 27, 2020 at 5:46 PM Tuno Tunante <[email protected]> wrote: > Dear all, > > Long time using beancount and more and more happy. Thank you! > > Sometimes you could need to make more complex searches or accounting. I > would like to propose you a script to help to > export the ledge to a PostgreSQL database. > > The file import_csv.sh do: > > - Delete (if exist) the old table with all the transactions > - Generate the CSV from the current bean file > - Create the table in the database > - Import the data to the table > - Erase all the spaces in front and behind all the string entries. > > All the information and some examples for translate the bean-query to psql > commands are here: > > https://github.com/tinotuno/Beancount-PostgreSQL > > Regards. > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/26b171bc-6280-48a9-b098-72cd57dfb743o%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/26b171bc-6280-48a9-b098-72cd57dfb743o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhPg7qauy3rDdewjF0D-X1WC35MRPyK-%3DrY%3DmN_wifU0rA%40mail.gmail.com.
