def METHOD_NAME(self, query, user):
    url = self.configuration["url"]
    kylinuser = self.configuration["user"]
    kylinpass = self.configuration["password"]
    kylinproject = self.configuration["project"]
    resp = requests.post(
        os.path.join(url, "api/query"),
        auth=HTTPBasicAuth(kylinuser, kylinpass),
        json={
            "sql": query,
            "offset": settings.KYLIN_OFFSET,
            "limit": settings.KYLIN_LIMIT,
            "acceptPartial": settings.KYLIN_ACCEPT_PARTIAL,
            "project": kylinproject,
        },
    )
    if not resp.ok:
        return {}, resp.text or str(resp.reason)
    data = resp.json()
    columns = self.get_columns(data["columnMetas"])
    rows = self.get_rows(columns, data["results"])
    return json_dumps({"columns": columns, "rows": rows}), None