diff --git a/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx b/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx
index a0a991cd572e1..0d4fc5fab2799 100644
--- a/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx
+++ b/superset/assets/src/SqlLab/components/TabbedSqlEditors.jsx
@@ -40,10 +40,12 @@ const propTypes = {
tabHistory: PropTypes.array.isRequired,
tables: PropTypes.array.isRequired,
offline: PropTypes.bool,
+ saveQueryWarning: PropTypes.string,
};
const defaultProps = {
queryEditors: [],
offline: false,
+ saveQueryWarning: null,
};
let queryCount = 1;
@@ -247,6 +249,7 @@ class TabbedSqlEditors extends React.PureComponent {
hideLeftBar={this.state.hideLeftBar}
defaultQueryLimit={this.props.defaultQueryLimit}
maxRow={this.props.maxRow}
+ saveQueryWarning={this.props.saveQueryWarning}
/>
)}
@@ -289,6 +292,7 @@ function mapStateToProps({ sqlLab, common }) {
offline: sqlLab.offline,
defaultQueryLimit: common.conf.DEFAULT_SQLLAB_LIMIT,
maxRow: common.conf.SQL_MAX_ROW,
+ saveQueryWarning: common.conf.SQLLAB_SAVE_WARNING_MESSAGE,
};
}
function mapDispatchToProps(dispatch) {
diff --git a/superset/config.py b/superset/config.py
index c44328e5a904a..d03a6bd6492f9 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -356,6 +356,9 @@
# Maximum number of tables/views displayed in the dropdown window in SQL Lab.
MAX_TABLE_NAMES = 3000
+# Adds a warning message on sqllab save query modal.
+SQLLAB_SAVE_WARNING_MESSAGE = None
+
# If defined, shows this text in an alert-warning box in the navbar
# one example use case may be "STAGING" to make it clear that this is
# not the production version of the site.
diff --git a/superset/views/base.py b/superset/views/base.py
index 4f3c8e8ae1e8b..071f2b335b658 100644
--- a/superset/views/base.py
+++ b/superset/views/base.py
@@ -43,6 +43,7 @@
'DEFAULT_SQLLAB_LIMIT',
'SQL_MAX_ROW',
'SUPERSET_WEBSERVER_DOMAINS',
+ 'SQLLAB_SAVE_WARNING_MESSAGE',
)