Move Data macros to macros.Query, make query param more flexible