dosubot[bot] commented on issue #29920:
URL: https://github.com/apache/superset/issues/29920#issuecomment-2284522276
<!-- Greeting -->
Hey @noahabbott123! 👋 I'm here to help you with any bugs, questions, or
contributions you have for the repository. I'm Dosu, a bot that's eager to
assist you.
<!-- Answer -->
To resolve the error "Expected table, found '(' (at char 28), (line:3,
col:3)" when creating a chart from a basic column retrieval in a DynamoDB table
with numbers, you need to ensure that the SQL query or expression you are using
is correctly formatted and does not contain any syntax errors.
Here is a step-by-step approach to troubleshoot and resolve the issue:
1. **Check the SQL Expression**: Ensure that the SQL expression used in the
chart configuration is correct. For example, if you are using a custom
expression, make sure it follows the correct syntax.
2. **Validate Column Names and Types**: Ensure that the column names and
types in your DynamoDB table match those expected by the chart configuration.
For example, if you are using a column named `TotalAlerts`, ensure it is
correctly defined as a numeric type.
3. **Review the Chart Configuration**: Verify that the chart configuration
in Superset is correctly set up. For example, ensure that the `groupby` and
`metrics` fields are correctly specified.
Here is an example of a correctly formatted SQL expression for a metric:
```sql
SELECT COUNT(*)
FROM AlertsMetrics
```
And here is an example of a correctly configured chart configuration in JSON
format:
```json
{
"datasource": "3__table",
"viz_type": "table",
"slice_id": 86,
"include_search": true,
"url_params": {},
"granularity_sqla": "ds",
"time_grain_sqla": "P3M",
"time_range": "No filter",
"query_mode": "aggregate",
"groupby": ["state", "gender", "name"],
"metrics": [
"sum__TotalAlerts"
]
}
```
Ensure that the `metrics` field contains valid metric expressions and that
the `groupby` field contains valid column names.
If the issue persists, review the specific SQL query or expression causing
the error and correct any syntax issues
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-table/birthNames.json)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]