There are no farmhands in L. Frank Baum's book The Wonderful Wizard of Oz. The farmhands only appear in the motion picture version, The Wizard of Oz, produced in 1939 and starring Judy Garland as Dorothy. The filmmakers wanted to give the story a somewhat more realistic spin, probably because it was a family picture and had to appeal to parents as well as children. So the writers showed at the end that Dorothy's whole adventure in the Land of Oz had been only a dream. She had made three farmhands into the Scarecrow, the Tin Woodman, and the Cowardly Lion in her dream. This segment, in which Judy Garland sings "Over the Rainbow," appears just before the tornado picks up the farmhouse and carries Dorothy off to Oz.
The three farmhands are "Hunk," played by Ray Bolger, who becomes the Scarecrow in Oz; "Zeke," played by Bert Lahr, who memorably becomes the Cowardly Lion; and "Hickory," played by Jack Haley, who becomes the Tin Woodman in Dorothy's dream. In the book her aunt and uncle are too poor to be able to hire three farmhands. When Dorothy wakes up, she recognizes the familiar and affectionate farmhands as the characters in her dream. She also recognizes the traveling fortune teller, and con man, Professor Marvel, played by Frank Morgan, as the Wizard of Oz himself.
In the movie version, Dorothy never gets carried away by the tornado but is knocked unconscious by a window sash in her own bedroom. Everything that happens to her in Oz is a dream.