mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 09:53:59 +00:00
Athena: use simple formatter to avoid the need to escape "%" character.
This commit is contained in:
parent
090962d09c
commit
c2e84c92c6
@ -1,9 +1,8 @@
|
||||
import logging
|
||||
import json
|
||||
import logging
|
||||
|
||||
from redash.utils import JSONEncoder
|
||||
from redash.query_runner import *
|
||||
|
||||
from redash.utils import JSONEncoder
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -33,6 +32,11 @@ _TYPE_MAPPINGS = {
|
||||
}
|
||||
|
||||
|
||||
class SimpleFormatter(object):
|
||||
def format(self, operation, parameters=None):
|
||||
return operation
|
||||
|
||||
|
||||
class Athena(BaseQueryRunner):
|
||||
noop_query = 'SELECT 1'
|
||||
|
||||
@ -119,7 +123,8 @@ class Athena(BaseQueryRunner):
|
||||
aws_secret_access_key=self.configuration.get('aws_secret_key', None),
|
||||
schema_name=self.configuration.get('schema', 'default'),
|
||||
encryption_option=self.configuration.get('encryption_option', None),
|
||||
kms_key=self.configuration.get('kms_key', None)).cursor()
|
||||
kms_key=self.configuration.get('kms_key', None),
|
||||
formatter=SimpleFormatter()).cursor()
|
||||
|
||||
try:
|
||||
cursor.execute(query)
|
||||
|
Loading…
Reference in New Issue
Block a user