Then the king commanded Ashpenaz, his chief eunuch, to bring some of the people of Israel, both of the royal family and of the nobility, youths without blemish, of good appearance and skillful in all wisdom, endowed with knowledge, understanding learning, and competent to stand in the king's palace, and to teach them the literature and language of the Chaldeans. The king assigned them a daily portion of the food that the king ate, and of the wine that he drank. They were to be educated for three years, and at the end of that time they were to stand before the king. Among these were Daniel, Hananiah, Mishael, and Azariah of the tribe of Judah. And the chief of the eunuchs gave them names: Daniel he called Belteshazzar, Hananiah he called Shadrach, Mishael he called Meshach, and Azariah he called Abednego. But Daniel resolved that he would not defile himself with the king's food, or with the wine that he drank. Therefore he asked the chief of the eunuchs to allow him not to defile himself. And God gave Daniel favor and compassion in the sight of the chief of the eunuchs: As for these four youths, God gave them learning and skill in all literature and wisdom, and Daniel had understanding in all visions and dreams. At the end of the time, when the king had commanded that they should be brought in, the chief of the eunuchs brought them in before Nebuchadnezzar. And the king spoke with them, and among all of them none was found like Daniel, Hananiah, Mishael, and Azariah. Therefore they stood before the king. And in every matter of wisdom and understanding about which the king inquired of them, he found them ten times better than all the magicians and enchanters that were in all his kingdom. And Daniel was there until the first year of King Cyrus.
–Daniel 1:3-9, 17-21