|
48 | 48 | u'database': None, # standard
|
49 | 49 | u'protocol': u'http', # support http/https
|
50 | 50 | u'warehouse': None, # snowflake
|
| 51 | + u'region': None, # snowflake |
51 | 52 | u'account': None, # snowflake
|
52 | 53 | u'schema': None, # snowflake
|
53 | 54 | u'role': None, # snowflake
|
@@ -144,6 +145,13 @@ def port(self):
|
144 | 145 | """
|
145 | 146 | return self._port
|
146 | 147 |
|
| 148 | + @property |
| 149 | + def region(self): |
| 150 | + u""" |
| 151 | + Region name if not the default Snowflake Database deployment |
| 152 | + """ |
| 153 | + return self._region |
| 154 | + |
147 | 155 | @property
|
148 | 156 | def proxy_host(self):
|
149 | 157 | u"""
|
@@ -469,8 +477,13 @@ def __config(self, **kwargs):
|
469 | 477 |
|
470 | 478 | if u'account' in kwargs and kwargs[u'account'] not in TEST_ACCOUNTS:
|
471 | 479 | if u'host' not in kwargs:
|
472 |
| - setattr(self, u'_host', |
473 |
| - self._account + u'.snowflakecomputing.com') |
| 480 | + if kwargs.get(u'region'): |
| 481 | + host = u'{0}.{1}.snowflakecomputing.com'.format( |
| 482 | + self._account[0:self._account.find(u'.')], |
| 483 | + kwargs.get(u'region')) |
| 484 | + else: |
| 485 | + host = u'{0}.snowflakecomputing.com'.format(self._account) |
| 486 | + setattr(self, u'_host', host) |
474 | 487 | if u'port' not in kwargs:
|
475 | 488 | setattr(self, u'_port', u'443')
|
476 | 489 | if u'protocol' not in kwargs:
|
|
0 commit comments