def executeQuery(self, format):

        query = self.buildQuery()
        query["format"] = format
        logging.debug("REST params\n{}".format(json.dumps(query)))

        select_url = self.dataset_url + "/query"

        try:
            # logging.info(select_url)
            response = requests.get(select_url, params=query)
            logging.info("URL poked {}".format(response.url))
        except requests.HTTPError as e:
            logging.error("Code: {}\nReason: {}".format(
                e.status_code, e.reason))
            logging.error("Content: {}".format(response.content))
            logging.error(traceback.format_exc())

        if response.status_code != 200:
            logging.error("Code: {}\nReason: {}".format(
                response.status_code, response.reason))
            logging.error("Content: {}".format(response.content))
            logging.error(traceback.format_exc())

        try:
            return response.json()
        except:
            return {}