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 2019/12/17 17:33:08 UTC

[GitHub] [incubator-superset] suddjian commented on a change in pull request #8810: factor out database model

suddjian commented on a change in pull request #8810: factor out database model
URL: https://github.com/apache/incubator-superset/pull/8810#discussion_r358930263
 
 

 ##########
 File path: superset/models/database.py
 ##########
 @@ -0,0 +1,601 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import json
+import logging
+import textwrap
+from contextlib import closing
+from copy import deepcopy
+from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type
+
+# pylint: disable=ungrouped-imports
+import numpy
+import pandas as pd
+import sqlalchemy as sqla
+import sqlparse
+from flask import g, request
+from flask_appbuilder import Model
+from sqlalchemy import (
+    Boolean,
+    Column,
+    create_engine,
+    Integer,
+    MetaData,
+    String,
+    Table,
+    Text,
+    UniqueConstraint,
+)
+from sqlalchemy.engine import Dialect, Engine, url
+from sqlalchemy.engine.reflection import Inspector
+from sqlalchemy.engine.url import make_url, URL
+from sqlalchemy.pool import NullPool
+from sqlalchemy.sql import Select
+from sqlalchemy_utils import EncryptedType
+
+from superset import db_engine_specs, security_manager
+from superset.db_engine_specs.base import TimeGrain
+from superset.models.core import (
+    config,
+    custom_password_store,
 
 Review comment:
   oh good catch, thanks

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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