The Sūtra of Jñānaka

In the Heaven of the Thirty-Three, a god has reached the end of his life. He foresees his rebirth as a pig and calls out to the Buddha to save him. The Buddha prompts him to seek refuge in the Three Jewels and, as a result, the god finds himself reborn into a wealthy family in Vaiśālī. In this life as a child named Jñānaka, he encounters the Buddha once more and invites him and his monks for a midday meal. The Buddha prophesies to Ānanda that the meritorious offering made by Jñānaka will eventually lead the child to awaken as the buddha known as King of Foremost Knowing.