data/v1 endpoint - Filter on columns and values with spaces in their names

Is it possible to filter results on the data/v1 endpoint with columns or values that have spaces in their names? I've tried every combination imaginable to get results for a column named Spend Category, but continuously get this 400 error. Filtering results with columns and values that don't have spaces works as expected. Documentation I've been referencing has no insight re: handling spacing. Tried %20 escape, backticks, underscores, hyphens, etc, etc, etc.
"Bad Request","message":"DA0012: A filter was provided to filter the data but it contains a grammatical error or is otherwise invalid and it could not be parsed. The offending filter is: Spend Category = redacted. The parsing error is: expression values cannot be parsed at Spend Category = redacted.
Request looks like below.
const where = ['Spend Category = REDACTED']; //Get the data var query = `/data/v1/${datasets[0]}?fields=${fields.join()}&filter=${where.join()}`;
https://developer.domo.com/docs/dev-studio-references/data-api
Documentation being used:
Answers
-
Do you have a fields variable defined in your code prior to this segment?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith I do. The code runs properly if the where claus contains words without spaces (e.g. test = test). The issue is only with the where clause having columns and values that have spaces in them.
Strange thing is the same column (Spend Category) is in the fields variable and that part of the request works fine as mentioned.
0 -
I'm having this exact same problem. The field with a space is listed as a field and that works fine. When I list the field as a groupby I get an error:
DA0057: An alias list was provided but it could not be parsed.
0
Categories
- 10.5K All Categories
- 3 Connect
- 913 Connectors
- 250 Workbench
- 458 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 476 Datasets
- 183 Visualize
- 249 Beast Mode
- 2.1K Charting
- 11 Variables
- 16 Automate
- 354 APIs & Domo Developer
- 88 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 245 Distribute
- 62 Domo Everywhere
- 242 Scheduled Reports
- 20 Manage
- 41 Governance & Security
- 168 Product Ideas
- 1.2K Ideas Exchange
- 9 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive