dosubot[bot] commented on issue #31569:
URL: https://github.com/apache/superset/issues/31569#issuecomment-2555003996

   <!-- Greeting -->
   Hey @gidinetapp! 👋 I'm here to help you with any bugs, questions, or 
contributions. Let's squash those bugs together!
   
   <!-- Answer -->
   I found two similar closed issues related to the syncing of columns in 
virtual datasets:
   
   1. **Issue 21907**: This issue discusses the problem where syncing columns 
from the source does not work unless the dataset is saved first. No solution 
was found in the comments 
<sup>[[1]](https://github.com/apache/superset/issues/21907)</sup>.
   
   2. **Issue 20907**: This issue addresses the need to ignore columns when 
syncing datasets that already contain calculated columns with the same name. No 
solution was found in the comments 
<sup>[[2]](https://github.com/apache/superset/issues/20907)</sup>.
   
   To address the concerns you've raised:
   
   1. **Syncing Before Saving**: Currently, there isn't a built-in mechanism to 
sync columns before saving the dataset. However, you could consider modifying 
the `syncMetadata` function to allow for pre-save syncing by integrating it 
into the dataset editing workflow.
   
   2. **Syncing with No Data Bug**: You can improve the `syncMetadata` function 
to handle cases where there is no data more gracefully. This involves checking 
for the presence of data before attempting to update columns and providing 
informative feedback to the user 
<sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/src/components/Datasource/DatasourceEditor.jsx)</sup>.
   
   3. **Automatic Syncing**: There is an existing automated process that can be 
leveraged to trigger column syncing automatically upon saving a dataset. The 
`tableChangeAndSyncMetadata` function can be used to validate and call the 
`syncMetadata` function when there is a change in the datasource properties, 
specifically the `table_name` attribute 
<sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/src/components/Datasource/DatasourceEditor.jsx)</sup>.
   
   
   <!-- 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/5f53e787-60df-44e9-8f10-a306c2d04cf9?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/5f53e787-60df-44e9-8f10-a306c2d04cf9?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/5f53e787-60df-44e9-8f10-a306c2d04cf9?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/5f53e787-60df-44e9-8f10-a306c2d04cf9?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/5f53e787-60df-44e9-8f10-a306c2d04cf9?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/5f53e787-60df-44e9-8f10-a306c2d04cf9?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]

Reply via email to