Macros for working with Sophia DB