luizcapu opened a new issue, #30377:
URL: https://github.com/apache/superset/issues/30377
### Bug description
`get_or_create` Dataset API endpoint breaks with `500 - Internal Server`
error if there is any existing dataset with the same `table_name`, regardless
of the dataset `schema`.
This is not the behaviour we observe on other endpoints, such as a `POST
/dataset` from where users are able to create datasets with the same
table_name, as long as they belong to either a different `database_id` or a
`different schema`.
### How to reproduce the bug
1. Go to the datasets page
2. Pick any existing dataset name and prepare a payload as follows (example
using the `users` datasets)
```
{
'table_name': 'users',
'schema': 'other',
'database_id': 1,
}
```
3. Submit this payload via a POST request to /api/v1/dataset/get_or_create
4. Note how the API will return with a `500 - Internal Server Error` response
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [X] 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: [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]