Yes you can using python. I am showing one way using pyodbc.
So,
step 1 - you need to create a odbc DSN in your windows or linux.
step 2 - you can use pyodbc to connect to hdfs.
import pyodbc
# Configuration settings for the ODBC connection
cfg = {'DSN': 'hivedb', 'host': 'abc.com','port': 0050,'username': 'foo', 'password': 'bar'}
# Create connection
conn_string='DSN=%s; database=default;AuthMech=3;UseSASL=1; UID=%s; PWD=%s; SSL=1;AllowSelfSignedServerCert=1;CAIssuedCertNamesMismatch=1' %(cfg['DSN'], cfg['username'], cfg['password'])
cursor = conn1.cursor()
cursor.execute("Truncate Table default.temp")
You can use pandas to store the selected data.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…