'Run query from specific data source.
Parameters:
:data_source_name_or_id string|integer: Name or ID of the data source
:query string: Query to run'

@staticmethod
def execute_query(data_source_name_or_id, query):

    try:
        if (type(data_source_name_or_id) == int):
            data_source = models.DataSource.get_by_id(data_source_name_or_id)
        else:
            data_source = models.DataSource.get_by_name(data_source_name_or_id)
    except models.NoResultFound:
        raise Exception(('Wrong    data    source    name/id:    %s.' % data_source_name_or_id))
    (data, error) = data_source.query_runner.run_query(query, None)
    if (error is not None):
        raise Exception(error)
    return json.loads(data)
