The customselect feature allows you to control what rows & columns get synchronized from one database to another. This functionality works both on the fly (when CRUD invokes a trigger), and when doing a fullcopy.
The command takes a SELECT statement, and is helpful in the following scenarios:
The test file t/20-postgres.t has a working example (grep for ‘customcols’).
The basic idea is to replace the default SELECT * FROM table
with a modified select list, by calling:
bucardo add customcols mytable "SELECT a,b, foo AS bar"
You can optionally constrain to a certain sync:
bucardo add customcols mytable "SELECT a,b, foo AS bar" sync=mysync
And/or to a certain database (which is probably what you want to do here):
bucardo add customcols mytable "SELECT a,b, foo AS bar" db=mymongodb
End Point Dev offers professional support for Bucardo, as well as specializing in developing, designing, and marketing effective websites. Since 1995, our diverse team of developers has shown that End Point can handle your organization’s greatest web and database challenges.