<p dir="auto">When a dashboard is exported not all the associated datasets are exported.<br>
The datasets used by all the charts are exported but the datasets used only in native filters are missing in the exported zip file.</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">The dashboard export should contain all the datasets used in the dashboard including the datasets used by native filters.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">The dashboard export contains the datasets used by the charts but is missing the datasets that are used only by native filters.</p>
<h4 dir="auto">How to reproduce the bug</h4>
<ol dir="auto">
<li>Go to a dashboard that uses native filters and has some charts. The native filters must use a dataset that is not used by any of the other charts</li>
<li>Export the dashboard</li>
<li>Unzip the exported zip file</li>
<li>Expand the datasets directory and notice that the datasets used by the charts are present but the dataset used by the filters are missing</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>superset version: 1.3 branch</li>
<li>Python version: Python 3.7.9</li>
<li>node.js version: 14</li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>
<p dir="auto">Column selection is not saved in export file, and saving dataset id in export file doesn't seem to be a correct approach</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Import a dashboard with native filter to a new workspace should work seemlessly.</p>
<h3 dir="auto">Actual results</h3>
<ol dir="auto">
<li>Selected column is not present in the export file, resulting in new dashboard native filter error with missing column selection.</li>
<li>Saving dataset id in the export file is an incorrect approach. The dataset id in a different workspace is different. In my example, dataset id =29 is already taken in the new workspace, this result in the imported dashboard showing the wrong dataset selection in native filter.</li>
</ol>
<h4 dir="auto">Screenshots</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/52086618/124030259-e1268d80-d9aa-11eb-9497-f373eb670a65.png"><img src="https://user-images.githubusercontent.com/52086618/124030259-e1268d80-d9aa-11eb-9497-f373eb670a65.png" alt="image" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/52086618/124030653-411d3400-d9ab-11eb-954f-382602aee88c.png"><img src="https://user-images.githubusercontent.com/52086618/124030653-411d3400-d9ab-11eb-954f-382602aee88c.png" alt="Clipboard 2021-30-06 at 1 44 38 PM" style="max-width: 100%;"></a></p>
<h4 dir="auto">How to reproduce the bug</h4>
<ol dir="auto">
<li>Create a dashboard</li>
<li>Create a value native filter and select dataset and column</li>
<li>Export this dashboard</li>
<li>Import this dashboard to a new workspace</li>
</ol>