You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "techieravishah (via GitHub)" <gi...@apache.org> on 2024/08/13 12:36:07 UTC
[I] Unable to create/see datasets [superset]
techieravishah opened a new issue, #29930:
URL: https://github.com/apache/superset/issues/29930
### Bug description
Hi Team,
I recently installed Superset 4.0.2 with MYSQL as database. Both of them are installed in the same VM. I have one database that I need to use to generate dashboards. We tried creating datasets but unable to create one.
### How to reproduce the bug
1. Installed Superset 4.0.2 + MYSQL8
2. OS - Linux Ubuntu 22.04 LTS
3. Logged in as an admin in superset. Navigate to Settings -> Database Connections -> Added a MYSQL Database -

4. Connection was successful.
5. Navigated to Datasets -> Clicked on +Dataset
6. Selected Database, Schema, Table
7. Clicked on Create Dataset and Create Chart
8. Got redirected to Charts screen, there I was unable to select the dataset.

Not sure, what is the issue. The only thing I was able to see in logs is - **"POST /api/v1/dataset/ HTTP/1.1" 422**
Can anyone assist with this errors?
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
I don't know
### Node version
I don't know
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Unable to create/see datasets [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #29930: Unable to create/see datasets
URL: https://github.com/apache/superset/issues/29930
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Unable to create/see datasets [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #29930:
URL: https://github.com/apache/superset/issues/29930#issuecomment-2776877058
Are you still facing this? I'll close it for now since it's been silent for 200+ days, but I'm happy to reopen it and move it to a Help Discussion if that's relevant.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Unable to create/see datasets [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #29930:
URL: https://github.com/apache/superset/issues/29930#issuecomment-2286159040
<!-- Greeting -->
Hey @techieravishah! I'm here to help you with the issue you're facing. I'm a bot that can assist with bug fixes, answer questions, and guide you on becoming a contributor. Let's tackle this together!
<!-- Answer -->
The error message **"POST /api/v1/dataset/ HTTP/1.1" 422** indicates a validation issue with the data being sent to create the dataset. The 422 status code means "Unprocessable Entity," which typically points to validation errors in the request payload.
To diagnose and resolve this issue, follow these steps:
1. **Ensure Correct JSON Payload**: Verify that the JSON payload sent to the `/api/v1/dataset/` endpoint is correctly formatted and contains all required fields. The `DatasetPostSchema` class defines the required fields and their validation rules:
```python
class DatasetPostSchema(Schema):
database = fields.Integer(required=True)
catalog = fields.String(allow_none=True, validate=Length(0, 250))
schema = fields.String(allow_none=True, validate=Length(0, 250))
table_name = fields.String(required=True, allow_none=False, validate=Length(1, 250))
sql = fields.String(allow_none=True)
owners = fields.List(fields.Integer())
is_managed_externally = fields.Boolean(allow_none=True, dump_default=False)
external_url = fields.String(allow_none=True)
normalize_columns = fields.Boolean(load_default=False)
always_filter_main_dttm = fields.Boolean(load_default=False)
```
2. **Check Server Logs**: Look for detailed error messages in the server logs that might provide more context about why the dataset creation failed.
3. **Enable Detailed Logging**: To capture more information, enable detailed logging by setting the logger level to `DEBUG` for the relevant module. You can do this by adding the following configuration:
```python
import logging
# Set the logger for the specific module to DEBUG level
logging.getLogger('superset.datasets.api').setLevel(logging.DEBUG)
```
You can place this configuration in your main application setup or configuration file where the logging is initialized.
4. **Known Issues**: There are known issues in Superset 4.0.2 related to dataset creation that might cause a `422` error due to `DatasetInvalidError` or `DatasetCreateFailedError` during the dataset creation process <sup>[[1]](https://github.com/apache/superset/blob/master/superset/datasets/api.py)</sup>.
By following these steps, you should be able to identify and resolve the issue causing the `422` error during dataset creation.
<!-- 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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org