mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
Implement create view as functionality (#9794)
Implement create view as button in sqllab Make CVAS configurable Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
This commit is contained in:
@@ -118,6 +118,7 @@ class Database(
|
||||
allow_run_async = Column(Boolean, default=False)
|
||||
allow_csv_upload = Column(Boolean, default=False)
|
||||
allow_ctas = Column(Boolean, default=False)
|
||||
allow_cvas = Column(Boolean, default=False)
|
||||
allow_dml = Column(Boolean, default=False)
|
||||
force_ctas_schema = Column(String(250))
|
||||
allow_multi_schema_metadata_fetch = Column( # pylint: disable=invalid-name
|
||||
@@ -147,6 +148,7 @@ class Database(
|
||||
"expose_in_sqllab",
|
||||
"allow_run_async",
|
||||
"allow_ctas",
|
||||
"allow_cvas",
|
||||
"allow_csv_upload",
|
||||
"extra",
|
||||
]
|
||||
|
||||
@@ -19,7 +19,6 @@ import re
|
||||
from datetime import datetime
|
||||
from typing import Any, Dict
|
||||
|
||||
# pylint: disable=ungrouped-imports
|
||||
import simplejson as json
|
||||
import sqlalchemy as sqla
|
||||
from flask import Markup
|
||||
@@ -40,6 +39,7 @@ from sqlalchemy.orm import backref, relationship
|
||||
from superset import security_manager
|
||||
from superset.models.helpers import AuditMixinNullable, ExtraJSONMixin
|
||||
from superset.models.tags import QueryUpdater
|
||||
from superset.sql_parse import CtasMethod
|
||||
from superset.utils.core import QueryStatus, user_label
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ class Query(Model, ExtraJSONMixin):
|
||||
limit = Column(Integer)
|
||||
select_as_cta = Column(Boolean)
|
||||
select_as_cta_used = Column(Boolean, default=False)
|
||||
ctas_method = Column(String(16), default=CtasMethod.TABLE)
|
||||
|
||||
progress = Column(Integer, default=0) # 1..100
|
||||
# # of rows in the result set or rows modified.
|
||||
|
||||
Reference in New Issue
Block a user