Pedlar of Swaffham

The Pedlar of Swaffham is an English folktale from Swaffham, Norfolk. The following text is taken from English Fairy and Other Folk Tales, 1906, which in turn refers to the Diary of Abraham dela Pryme, 1699:

Origins
Similar legends can be found throughout Europe and the Middle East. The earliest version is one of the poems of the Mathanawi titled "In Baghdad, Dreaming of Cairo: In Cairo, Dreaming of Baghdad", by 13th-century Persian poet Jalal al-Din Rumi. This poem was turned into a story in the tale from One Thousand and One Nights: "The man who became rich through a dream"; and spread through various countries' folklore, children's tales and literature.

More recently, the story was adapted into the plot of the novel The Alchemist by Paulo Coelho, who took the structure from Jorge Luis Borges story "The Tale of Two Dreamers" in A Universal History of Iniquity (1935).