Question: I'm want to add **OR** condition in the JSON query of Cube.js. But once I added one more condition in the filter it always adds **AND** condition in SQL query.

Below is the JSON query that I'm trying.

```
{
  "dimensions": [
    "Employee.name",
    "Employee.company"
  ],
  "timeDimensions": [],
  "measures": [],
  "filters": [
    {
      "dimension": "Employee.company",
      "operator": "contains",
      "values": [
        "soft"
      ]
    },
    {
      "dimension": "Employee.name",
      "operator": "contains",
      "values": [
        "soft"
      ]
    }
  ]
}

```

It generates below SQL query.

```sql
SELECT
  `employee`.name `employee__name`,
  `employee`.company `employee__company`
FROM
  DEMO.Employee AS `employee`
WHERE
  `employee`.company LIKE CONCAT('%', 'soft', '%') 
             AND 
  `employee`.name LIKE CONCAT('%', 'soft', '%')
GROUP BY
  1,
  2;

```

What is the JSON query for Cube.js if I want to generate below SQL

```sql
SELECT
  `employee`.name `employee__name`,
  `employee`.company `employee__company`
FROM
  DEMO.Employee AS `employee`
WHERE
  `employee`.company LIKE CONCAT('%', 'soft', '%') 
             OR
  `employee`.name LIKE CONCAT('%', 'soft', '%')
GROUP BY
  1,
  2;

```

Answer: 
API support for logical operators isn't shipped yet. Meanwhile there're several workarounds:

1. Define dimension that mimics **OR** behavior. In your case it's

```js
cube(`Employee`, {
 // ...

 dimensions: {
   companyAndName: {
     sql: `CONCAT(${company}, ' ', ${name})`,
     type: `string`
   }
 }
});

```

2. Define segments. Those can be also generated: <https://cube.dev/docs/schema-generation>

```js
cube(`Employee`, {
  // ...

  segments: {
    soft: {
      sql: `${company} LIKE CONCAT('%', 'soft', '%') OR ${name} LIKE CONCAT('%', 'soft', '%')` 
    }
  }
});

```
this is how you do it

```
{
      or: [
        {
           "dimension": "Employee.company",
           "operator": "contains",
           "values": [
              "soft"
              ]
        },
        {
           "dimension": "Employee.name",
           "operator": "contains",
           "values": [
             "soft"
             ]
         }

      ];
    }

```

Refer to this [Boolean logical operators section](https://cube.dev/docs/query-format#boolean-logical-operators) in the documentation