the tail that wagged the dog

The tail that wagged the dog is a phrase which is used to describe a situation where a small part of it is controlling the whole of something. In the idiom, the tail that wagged the dog, the example is used as a tail for a dog rather than the other way around, because the tail of a dog tends to be a big part of any dog when it is wagging and almost controlling the dogs motions.