fix(snowflake): support geo types (#3686)

* Mapping Snowflake's GEOPGRAPHY type to Nulltype as a workaround as SqlAlchemy does not know about it 

Co-authored-by: treff7es <treff7es@gmail.com>
This commit is contained in:
Gabe Lyons 2021-12-07 19:36:10 -08:00 committed by GitHub
parent 0576b76eb3
commit 1c17ba76d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,10 +7,10 @@ import pydantic
# This import verifies that the dependencies are available.
import snowflake.sqlalchemy # noqa: F401
from snowflake.sqlalchemy import custom_types
from snowflake.sqlalchemy import custom_types, snowdialect
from sqlalchemy import create_engine, inspect
from sqlalchemy.engine.reflection import Inspector
from sqlalchemy.sql import text
from sqlalchemy.sql import sqltypes, text
import datahub.emitter.mce_builder as builder
from datahub.configuration.common import AllowDenyPattern
@ -44,6 +44,8 @@ logger: logging.Logger = logging.getLogger(__name__)
APPLICATION_NAME = "acryl_datahub"
snowdialect.ischema_names["GEOGRAPHY"] = sqltypes.NullType
class BaseSnowflakeConfig(BaseTimeWindowConfig):
# Note: this config model is also used by the snowflake-usage source.