https://en.m.wikipedia.org/wiki/Danel
Seems to be what you are writing about. Danel/Dnil is a character in 14th century BC, Ugartic text. Daniel is more than a 1000 years later. From wiki
"The text in Corpus Tablettes Alphabétiques [CTA] 17–19 is often referred to as the Epic of Aqhat. Danel was depicted as "judging the cause of the widow, adjudicating the case of the fatherless" in the city gate.[3] He passed through trials: his son Aqhat was destroyed but apparently in the missing conclusion was revived or replaced by Danel's patron god, Rp'u, who sits and judges with Hadad and Astarte and was likely considered to be the equivalent of El.
The text was published and translated in 1936 by Charles Virolleaud[4] and has been extensively analysed since then.[5]"
That's just the intro.