The Milkmaid and Her Pail is a folktale of Aarne-Thompson-Uther type 1430 about interrupted daydreams of wealth and fame. Ancient tales of this type exist in the East but Western variants are not found before the Middle Ages. It was only in the 18th century that the story about the daydreaming milkmaid began to be attributed to Aesop, although it was included in none of the main collections, and it does not appear in the Perry Index.
There is a theme common to the many different stories of this type that involves poor persons daydreaming of future wealth arising from a temporary possession. When they get carried away by their fantasy and start acting it out, they break the container on which their dream is founded and find themselves worse off. One of the earliest is included in the Indian Panchatantra as "The brahman who built air-castles". There a man speculates about the wealth that will flow from selling a pot of grain that he has been given, progressing through a series of sales of animals until he has enough to support a wife and family. The child misbehaves, his wife takes no heed, so he kicks her and in doing so upsets the pot that was to make his fortune. Other variants include Bidpai's "The Poorman and the Flask of Oil", "The Barber's Tale of his Fifth Brother" from The 1001 Nights and the Jewish story of "The Dervish and the Honey Jar".
From its earliest appearance in the 14th century, the story of the daydreaming milkmaid has been told as a cautionary fable illustrating the lesson that you should 'Confine your thoughts to what is real'. It appears in Dialogue 100 of the Dialogus creaturarum. It also appears under the title "Of what happened to a woman called Truhana" in Don Juan Manuel's Tales of Count Lucanor (1335), one of the earliest works of prose in Castilian Spanish It is different from the Eastern variants in that it is told of a woman on the way to market who starts to speculate on the consequences of investing the sale of her wares in eggs and breeding chickens from them. In this case it is a jar of honey that she unbalances from her head. When the story reappears in a 16th-century French version, the woman has become a milkmaid and engages in detailed financial calculations of her profits.