Goal --> I am trying to automate the query execution process using Python
Detail --> My Source is Teradata Database a
Let's solve the title problem. To output Japanese (or any language) to a file:
Example using Python 3:
s = 'ペット用品'
with open('results.txt','w',encoding='utf8') as f:
f.write(s)
Your rows
isn't a Unicode string, but a list with a tuple with an incorrect string. That's another problem you'll have to solve.