add mappes for tenant and numeric data queries

This commit also makes inserting a tenant a conditional update so that we can
prevent overwrites.