You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| numeric_to_float | bool | Specifies if NUMERIC datatype values will be converted from decimal.Decimal to float. By default NUMERIC values are received as decimal.Decimal | False | No |
Copy file name to clipboardExpand all lines: redshift_connector/__init__.py
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -179,6 +179,7 @@ def connect(
179
179
endpoint_url: typing.Optional[str] =None,
180
180
provider_name: typing.Optional[str] =None,
181
181
scope: typing.Optional[str] =None,
182
+
numeric_to_float: typing.Optional[bool] =False,
182
183
) ->Connection:
183
184
"""
184
185
Establishes a :class:`Connection` to an Amazon Redshift cluster. This function validates user input, optionally authenticates using an identity provider plugin, then constructs a :class:`Connection` object.
@@ -272,6 +273,8 @@ def connect(
272
273
The name of the Redshift Native Auth Provider.
273
274
scope: Optional[str]
274
275
Scope for BrowserAzureOauth2CredentialsProvider authentication.
276
+
numeric_to_float: Optional[str]
277
+
Specifies if NUMERIC datatype values will be converted from ``decimal.Decimal`` to ``float``. By default NUMERIC values are received as ``decimal.Decimal``.
275
278
Returns
276
279
-------
277
280
A Connection object associated with the specified Amazon Redshift cluster: :class:`Connection`
Creates a :class:`Connection` to an Amazon Redshift cluster. For more information on establishing a connection to an Amazon Redshift cluster using `federated API access <https://aws.amazon.com/blogs/big-data/federated-api-access-to-amazon-redshift-using-an-amazon-redshift-connector-for-python/>`_ see our examples page.
@@ -461,6 +464,8 @@ def __init__(
461
464
The name of the Redshift Native Auth Provider.
462
465
web_identity_token: Optional[str]
463
466
A web identity token used for authentication via Redshift Native IDP Integration
467
+
numeric_to_float: bool
468
+
Specifies if NUMERIC datatype values will be converted from ``decimal.Decimal`` to ``float``. By default NUMERIC values are received as ``decimal.Decimal``.
0 commit comments