You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/15 11:27:30 UTC

[GitHub] [superset] villebro commented on a change in pull request #19104: feat(sqllab): WIP Add a configuration option to disable data preview

villebro commented on a change in pull request #19104:
URL: https://github.com/apache/superset/pull/19104#discussion_r826863173



##########
File path: superset-frontend/src/components/DatabaseSelector/DatabaseSelector.test.tsx
##########
@@ -76,6 +76,7 @@ beforeEach(() => {
             allows_cost_estimate: 'Allows Cost Estimate',
             allows_subquery: 'Allows Subquery',
             allows_virtual_table_explore: 'Allows Virtual Table Explore',
+            disable_preview_data: 'Disables SQL Lab Data Preview',

Review comment:
       nit: would `disable_data_preview` be a more appropriate name?

##########
File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/ExtraOptions.tsx
##########
@@ -198,6 +198,23 @@ const ExtraOptions = ({
                 />
               </div>
             </StyledInputContainer>
+            <StyledInputContainer>
+              <div className="input-container">
+                <IndeterminateCheckbox
+                  id="disable_preview_data"
+                  indeterminate={false}
+                  checked={!!db?.extra_json?.disable_preview_data}
+                  onChange={onExtraInputChange}
+                  labelText={t('Disable SQL Lab data preview queries')}
+                />
+                <InfoTooltip
+                  tooltip={t(
+                    'The disable_preview_data field is a boolean specifying whether or not data ' +
+                      'preview queries will be run when fetching table metadata in SQL Lab.',

Review comment:
       This could probably be simplified. Something along these lines :
   > Disable data preview when fetching table metadata in SQL Lab. Useful to avoid browser performance issues when using databases with very wide tables.
   




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org