dosubot[bot] commented on issue #32982: URL: https://github.com/apache/superset/issues/32982#issuecomment-2772903008
<!-- Answer --> The error code 422 with the message "Dataset parameters are invalid" can occur due to several reasons when duplicating a dataset using the `/api/v1/dataset/duplicate` endpoint. Here are some potential causes and solutions: 1. **Duplicate Table Name**: The `table_name` you are trying to use for the new dataset already exists. Ensure that the `table_name` "suivi_activite_vendeur_devis" is unique and not already in use by another dataset <sup>[[1]](https://github.com/apache/superset/blob/master/superset/commands/dataset/duplicate.py)</sup>. 2. **Invalid Datasource Type**: The base model must be of kind "virtual". Your dataset has the kind "virtual", so this should not be an issue in your case <sup>[[1]](https://github.com/apache/superset/blob/master/superset/commands/dataset/duplicate.py)</sup>. 3. **Invalid Payload**: Ensure that the JSON payload is correctly structured and does not contain any unknown fields. The expected structure is: ```json { "base_model_id": <id_of_the_dataset_to_duplicate>, "table_name": <new_dataset_name> } ``` Your payload seems correctly structured, so this might not be the issue <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/src/pages/DatasetList/index.tsx)</sup>. 4. **Owner Validation**: There might be an issue with the owners specified. Ensure that the owners are correctly specified and valid <sup>[[1]](https://github.com/apache/superset/blob/master/superset/commands/dataset/duplicate.py)</sup>. Double-check these aspects to resolve the error. If the issue persists, consider verifying the dataset's properties and any additional constraints that might be applied in your Superset instance. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/bce7ca4e-1898-4f2c-a8cd-3fde003b73bc?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/bce7ca4e-1898-4f2c-a8cd-3fde003b73bc?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/bce7ca4e-1898-4f2c-a8cd-3fde003b73bc?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/bce7ca4e-1898-4f2c-a8cd-3fde003b73bc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bce7ca4e-1898-4f2c-a8cd-3fde003b73bc?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/bce7ca4e-1898-4f2c-a8cd-3fde003b73bc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bce7ca4e-1898-4f2c-a8cd-3fde003b73bc?feedback_type=other)</sup> -- 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]
