Bereshit / Genesis 41:1 · Pshat
וַיְהִי מִקֵּץ שְׁנָתַיִם יָמִים וּפַרְעֹה חֹלֵם וְהִנֵּה עֹמֵד עַל־הַיְאֹר׃
And it was at the end of two full years: Pharaoh was dreaming, and behold, he was standing by the Nile.
Pshat פְּשָׁט
A dream by the river
Yosef sits in prison, forgotten by the cupbearer. Then Pharaoh dreams. The commentators explain what "at the end" means, why the river gets a special word, and who really stands behind this dream.
Rashi: "at the end" (מִקֵּץ) means "at the close", and the Torah calls only the Nile by the word "river" (יְאֹר): Egypt lives not by rain but by the Nile rising through its canals. Radak: the dream came from God, like prophecy. The wise men of Egypt could not solve it, so that Yosef would rise to greatness.
How Rashi and Radak explain it
Rashi And it was at the end
As the Aramaic translation (Targum) has it: "at the close". Every use of the word "end" (קֵץ) means a close.
By the river.
No other rivers are called "river" (יְאֹר) except the Nile, because the whole land is made of man-made canals, and the Nile rises through them and waters it, for rain does not fall in Egypt as often as in other lands.
Radak He was standing by the river
Next to the river, as in "and next to him the tribe of Menasheh" (Bamidbar / Numbers 2:20) and the like. Blessed is He Who is awesome in His deeds toward people, Who arranged all these causes, one after another, until our fathers went down to live there, and came there with honour, and were there with honour for a hundred years until Yosef died. Then sins brought on the days of slavery. And the dream was from God, like prophecy, as the verse says: "and He called a famine upon the land" (Tehillim / Psalms 105:16). And the dream came true as Yosef interpreted it. Its meaning was clear to anyone with understanding, but the wisdom of Egypt's wise men was lost, so that Yosef would interpret it and rise to greatness through the interpretation. Of this it is said: "He turns the wise backward and makes their knowledge foolish" (Yeshayahu / Isaiah 44:25).
Takeaway
The word יְאֹר (river) came into Hebrew from Egyptian, where it means "great river". In the Bible it almost always means the Nile.
Radak looks at the whole story at once: Pharaoh's dream is a link in the chain that brings Yaakov and his sons down to Egypt.
The verse from Yeshayahu that Radak cites speaks of wise men whose knowledge suddenly fails. So here: all of Pharaoh's interpreters fall silent, and the word goes to a prisoner.