DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'sampletest',
'OPTIONS': {
'driver': '/opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so',
'dsn': 'Hive1',
'host_is_server': True,
},
}
}
Above is the Django settings for the connectivity with the Hive database; Here I am facing an issue when I run the project which is given below:
django.db.utils.Error: ('HY000', u"[HY000] [Cloudera][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement: FAILED: ParseException line 1:7 character '@' not supported here\nline 1:8 character '@' not supported here (80) (SQLExecDirectW)")
The query where it is occurring is actually a standard query
"SELECT @@TRANCOUNT"
which is triggered by Django while connectivity
Please suggest solution. Thanks in Advance.