Before grain was ground into flour, it was sifted in a sieve to remove any dirt or sand that had become mixed in with the grain during the harvesting process (see note on Ruth 3:2). The larger gain would remain in the sieve while the smaller dirt particles would fall through the sieve to the ground.
Amos used this image to show what God planned to do with the nation of Israel. He would sift out the righteous of the land-the grain-and form them into a remnant that He would restore to the land one day. But the wicked and unrepentant-the dirt-would fall to the ground and experience His wrath and judgment.
AMOS 9:9- I [God] will sift the house of Israel among all nations, like as corn [grain, NIV] is sifted in a sieve, yet shall not the least grain fall upon the earth.