-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Superset-4.1.0rc2: Download to CSV option is not showing up in SQL LAB page. #30204
Comments
I found a similar issue that might be relevant to your problem: Excel export option missing in sql lab. This issue is closed and was last updated on June 28, 2024. It was referenced by a pull request that added the Excel export feature [1]. Regarding the "Download to CSV" option in Superset 4.1.0rc2, there have been changes in the UI. The "Download to CSV" functionality has been moved to a submenu under "Download" in the newer version. Here is the relevant code snippet: {props.supersetCanCSV && (
<Menu.SubMenu
title={t('Download')}
key={MenuKeys.Download}
onTitleMouseEnter={() => setOpenKeys(undefined)}
>
<Menu.Item
key={MenuKeys.ExportCsv}
icon={<Icons.FileOutlined css={dropdownIconsStyles} />}
>
{t('Export to .CSV')}
</Menu.Item>
{isPivotTable && (
<Menu.Item
key={MenuKeys.ExportPivotCsv}
icon={<Icons.FileOutlined css={dropdownIconsStyles} />}
>
{t('Export to Pivoted .CSV')}
</Menu.Item>
)}
<Menu.Item
key={MenuKeys.ExportXlsx}
icon={<Icons.FileOutlined css={dropdownIconsStyles} />}
>
{t('Export to Excel')}
</Menu.Item>
</Menu.SubMenu>
)} Additionally, ensure that the export interface ResultSetProps {
...
csv?: boolean;
...
}
const ResultSet = ({
...
csv = true,
...
}: ResultSetProps) => {
...
const canExportData = findPermission(
'can_export_csv',
'SQLLab',
user?.roles,
);
const renderControls = () => {
if (search || visualize || csv) {
...
return (
<ResultSetControls>
...
<ResultSetButtons>
...
{csv && canExportData && (
<Button
buttonSize="small"
href={getExportCsvUrl(query.id)}
data-test="export-csv-button"
onClick={() => logAction(LOG_ACTIONS_SQLLAB_DOWNLOAD_CSV, {})}
>
<i className="fa fa-file-text-o" /> {t('Download to CSV')}
</Button>
)}
...
</ResultSetButtons>
...
</ResultSetControls>
);
}
return <div />;
};
...
}; In the configuration file DEFAULT_FEATURE_FLAGS: dict[str, bool] = {
...
"ALLOW_FULL_CSV_EXPORT": False,
...
} Make sure these settings are correctly configured to enable the "Download to CSV" option [2][3][4]. |
Hi @michael-s-molina , @sadpandajoe : The answer from @dosubot did not helped me here. As I mentioned this download to csv feature is working good in earlier version(3.0.0) of superset. I tried with both ALLOW_FULL_CSV_EXPORT as True and False (though earlier I kept it as false it is still working in 3.0.0), it is not working in 4.1.0rc02. |
@rabindragogoi does this work with 4.0.2? Trying to determine if this is a regression as part of 4.1.0rc2 or if it was broken between 3.0.0 and now. |
Hi @sadpandajoe : No it is not working in 4.0.2. Infact sql lab with presto database connection is not working in 4.0.2. |
@rabindragogoi I believe this is something with your deployment. You can access a test environment for 4.0.2 here and the |
Hi @michael-s-molina : Trying with 4.0.2 will not work for me because in this version querying with presto database connection is showing error in SQLLab. I raised this issue earlier and thats why you asked me to try 4.1.0rc2. Could you check if the download to csv is working in 4.1.0rc2 ? |
@rabindragogoi @sadpandajoe It's working for 4.0.2 but not working for 4.1.0RC2. It looks like the @sadpandajoe This will be a blocker for the release as it's a regression from 4.0.2. |
@rabindragogoi Just to confirm that this is working in 4.0.2 with a Presto connection. |
Hi @michael-s-molina : Let me reverify once. I will update here. |
Hi @michael-s-molina : Yes. I am able to download data from Superset now .(Version 4.0.2). Issue was with my Flask-AppBuilder version. I was using Flask-AppBuilder==4.4.1. Now I am using Flask-AppBuilder==4.5.0. Which is working now. |
Issue closed |
@rabindragogoi I reopened the issue as it's happening on 4.1.0RC2. |
Thanks for checking this @betodealmeida. I was not able to reproduce either. Let's close this issue and reopen it if necessary. |
Bug description
In SqlLab the download to CSV option is not showing up to download the data. This option we can see in 3.0.0 version of superset but in 4.1.0rc2 it is not showing up even though I am assigned as an Admin user.
Screenshot: 4.1.0rc02:
Screenshot: 3.0.0:
@michael-s-molina @sadpandajoe : Is there any change in the UI for this functionality.?
How to reproduce the bug
In superset 4.0.1rc02.
Run a query in SQL LAB and check if you can see the download to csv option.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.11
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: