Skip to content

Commit 2ab43ff

Browse files
tomcnolantn180005
authored andcommitted
2023-05-19_15:20:19
1 parent 95321b2 commit 2ab43ff

1 file changed

Lines changed: 34 additions & 31 deletions

File tree

README.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ Copyright 2023 Teradata. All Rights Reserved.
4646
* [CSV Export Results](#CSVExportResults)
4747
* [Change Log](#ChangeLog)
4848

49-
Table of Contents links do not work on PyPI due to a [PyPI limitation](https://github.com/pypa/warehouse/issues/4064).
50-
51-
<a name="Features"></a>
49+
<a id="Features"></a>
5250

5351
### Features
5452

@@ -77,15 +75,15 @@ At the present time, the driver offers the following features.
7775
* Stored Procedure Dynamic Result Sets.
7876
* FastLoad and FastExport.
7977

80-
<a name="Limitations"></a>
78+
<a id="Limitations"></a>
8179

8280
### Limitations
8381

8482
* The UTF8 session character set is always used. The `charset` connection parameter is not supported.
8583
* No support yet for Recoverable Network Protocol and Redrive.
8684
* Monitor partition support is not available yet.
8785

88-
<a name="Installation"></a>
86+
<a id="Installation"></a>
8987

9088
### Installation
9189

@@ -105,7 +103,7 @@ Platform | Command
105103
macOS or Linux | `pip install --no-cache-dir -U teradatasql`
106104
Windows | `py -3 -m pip install --no-cache-dir -U teradatasql`
107105

108-
<a name="License"></a>
106+
<a id="License"></a>
109107

110108
### License
111109

@@ -115,15 +113,15 @@ When the driver is installed, the `LICENSE` and `THIRDPARTYLICENSE` files are pl
115113

116114
In addition to the license terms, the driver may contain beta/preview features ("Beta Features"). As such, by downloading and/or using the driver, in addition to the licensing terms, you acknowledge that the Beta Features are experimental in nature and that the Beta Features are provided "AS IS" and may not be functional on any machine or in any environment.
117115

118-
<a name="Documentation"></a>
116+
<a id="Documentation"></a>
119117

120118
### Documentation
121119

122120
When the driver is installed, the `README.md` file is placed in the `teradatasql` directory under your Python installation directory. This permits you to view the documentation offline, when you are not connected to the Internet.
123121

124122
The `README.md` file is a plain text file containing the documentation for the driver. While the file can be viewed with any text file viewer or editor, your viewing experience will be best with an editor that understands Markdown format.
125123

126-
<a name="SamplePrograms"></a>
124+
<a id="SamplePrograms"></a>
127125

128126
### Sample Programs
129127

@@ -161,7 +159,7 @@ Program
161159
[StoredProc.py](https://github.com/Teradata/python-driver/blob/master/samples/StoredProc.py) | Demonstrates how to create and call a SQL stored procedure
162160
[TJEncryptPassword.py](https://github.com/Teradata/python-driver/blob/master/samples/TJEncryptPassword.py) | Creates encrypted password files
163161

164-
<a name="Using"></a>
162+
<a id="Using"></a>
165163

166164
### Using the Driver
167165

@@ -187,7 +185,7 @@ Connection parameters specified using a combination:
187185

188186
When a combination of parameters are specified, connection parameters specified as `kwargs` take precedence over same-named connection parameters specified in the JSON string.
189187

190-
<a name="ConnectionParameters"></a>
188+
<a id="ConnectionParameters"></a>
191189

192190
### Connection Parameters
193191

@@ -204,6 +202,7 @@ Parameter | Default | Type | Description
204202
`column_name` | `"false"` | quoted boolean | Controls the behavior of cursor `.description` sequence `name` items. Equivalent to the Teradata JDBC Driver `COLUMN_NAME` connection parameter. False specifies that a cursor `.description` sequence `name` item provides the AS-clause name if available, or the column name if available, or the column title. True specifies that a cursor `.description` sequence `name` item provides the column name if available, but has no effect when StatementInfo parcel support is unavailable.
205203
`connect_failure_ttl` | `"0"` | quoted integer | Specifies the time-to-live in seconds to remember the most recent connection failure for each IP address/port combination. The driver subsequently skips connection attempts to that IP address/port for the duration of the time-to-live. The default value of zero disables this feature. The recommended value is half the database restart time. Equivalent to the Teradata JDBC Driver `CONNECT_FAILURE_TTL` connection parameter.
206204
`connect_function` | `"0"` | quoted integer | Specifies whether the database should allocate a Logon Sequence Number (LSN) for this session, or associate this session with an existing LSN. Specify `0` for a session with no LSN (the default). Specify `1` to allocate a new LSN for the session. Specify `2` to associate the session with the existing LSN identified by the `logon_sequence_number` connection parameter. The database only permits sessions for the same user to share an LSN. Equivalent to the Teradata JDBC Driver `CONNECT_FUNCTION` connection parameter.
205+
`connect_timeout` | `"0"` | quoted integer | Specifies the timeout in milliseconds for establishing a TCP socket connection. Zero means no timeout.
207206
`cop` | `"true"` | quoted boolean | Specifies whether COP Discovery is performed. Equivalent to the Teradata JDBC Driver `COP` connection parameter.
208207
`coplast` | `"false"` | quoted boolean | Specifies how COP Discovery determines the last COP hostname. Equivalent to the Teradata JDBC Driver `COPLAST` connection parameter. When `coplast` is `false` or omitted, or COP Discovery is turned off, then no DNS lookup occurs for the coplast hostname. When `coplast` is `true`, and COP Discovery is turned on, then a DNS lookup occurs for a coplast hostname.
209208
`database` | | string | Specifies the initial database to use after logon, instead of the user's default database. Equivalent to the Teradata JDBC Driver `DATABASE` connection parameter.
@@ -225,6 +224,7 @@ Parameter | Default | Type | Description
225224
`logdata` | | string | Specifies extra data for the chosen logon authentication method. Equivalent to the Teradata JDBC Driver `LOGDATA` connection parameter.
226225
`logmech` | `"TD2"` | string | Specifies the logon authentication method. Equivalent to the Teradata JDBC Driver `LOGMECH` connection parameter. Possible case-insensitive values are `TD2` (the default), `BROWSER`, `JWT`, `LDAP`, `KRB5` for Kerberos, or `TDNEGO`. Browser Authentication is supported for Windows and macOS.
227226
`logon_sequence_number` | | quoted integer | Associates this session with an existing Logon Sequence Number (LSN) when `connect_function` is `2`. The database only permits sessions for the same user to share an LSN. An LSN groups multiple sessions together for workload management. Using an LSN is a three-step process. First, establish a control session with `connect_function` as `1`, which allocates a new LSN. Second, obtain the LSN from the control session using the escape function `{fn teradata_logon_sequence_number}`. Third, establish an associated session with `connect_function` as `2` and the logon sequence number. Equivalent to the Teradata JDBC Driver `LOGON_SEQUENCE_NUMBER` connection parameter.
227+
`logon_timeout` | `"0"` | quoted integer | Specifies the logon timeout in seconds. Zero means no timeout.
228228
`manage_error_tables` | `"true"` | quoted boolean | Controls whether the driver manages the FastLoad error tables.
229229
`max_message_body` | `"2097000"` | quoted integer | Specifies the maximum Response Message size in bytes. Equivalent to the Teradata JDBC Driver `MAX_MESSAGE_BODY` connection parameter.
230230
`oidc_scope` | `"openid"` | string | Specifies the OpenID Connect (OIDC) scope to use for Browser Authentication. Beginning with Teradata Database 17.20.03.11, the default scope can be specified in the database's `TdgssUserConfigFile.xml` file, using the `IdPConfig` element's `Scope` attribute. Browser Authentication is supported for Windows and macOS. Equivalent to the Teradata JDBC Driver `OIDC_SCOPE` connection parameter.
@@ -244,7 +244,7 @@ Parameter | Default | Type | Description
244244
`tmode` | `"DEFAULT"` | string | Specifies the transaction mode. Equivalent to the Teradata JDBC Driver `TMODE` connection parameter. Possible values are `DEFAULT` (the default), `ANSI`, or `TERA`.
245245
`user` | | string | Specifies the database username. Equivalent to the Teradata JDBC Driver `USER` connection parameter.
246246

247-
<a name="COPDiscovery"></a>
247+
<a id="COPDiscovery"></a>
248248

249249
### COP Discovery
250250

@@ -279,7 +279,7 @@ The driver masks connection failures to down COPs, thereby hiding most connectio
279279

280280
If COP Discovery is turned off, or no COP hostnames are defined in DNS, the driver connects directly to the hostname specified in the `host` connection parameter. This permits load distribution schemes other than the COP Discovery approach. For example, round-robin DNS or a TCP/IP load distribution product can be used. COP Discovery takes precedence over simple database hostname lookup. To use an alternative load distribution scheme, either ensure that no COP hostnames are defined in DNS, or turn off COP Discovery with `cop` as `false`.
281281

282-
<a name="StoredPasswordProtection"></a>
282+
<a id="StoredPasswordProtection"></a>
283283

284284
### Stored Password Protection
285285

@@ -473,7 +473,7 @@ Before decryption, the driver calculates the MAC using the ciphertext, transform
473473

474474
Finally, the driver uses the decrypted password to log on to the database.
475475

476-
<a name="ClientAttributes"></a>
476+
<a id="ClientAttributes"></a>
477477

478478
### Client Attributes
479479

@@ -526,7 +526,7 @@ Field | Source | Description
526526
7 | driver | The client program name
527527
8 | driver | The string `01 LSS` to indicate the `LogonSource` string version `01`
528528

529-
<a name="TransactionMode"></a>
529+
<a id="TransactionMode"></a>
530530

531531
### Transaction Mode
532532

@@ -549,7 +549,7 @@ A drawback of using ANSI mode is that you can only call stored procedures that w
549549

550550
Refer to the Teradata Reference / *SQL Request and Transaction Processing* for complete information regarding the differences between ANSI and TERA transaction modes.
551551

552-
<a name="AutoCommit"></a>
552+
<a id="AutoCommit"></a>
553553

554554
### Auto-Commit
555555

@@ -603,7 +603,7 @@ Please note that neither previous example shows best practices. Best practices r
603603
cur.execute("insert into mytable2 values(3, 4)")
604604
con.commit()
605605

606-
<a name="DataTypes"></a>
606+
<a id="DataTypes"></a>
607607

608608
### Data Types
609609

@@ -669,7 +669,7 @@ Transforms are used for SQL `ARRAY` data values, and they can be transferred to
669669

670670
Transforms are used for structured UDT data values, and they can be transferred to and from the database as `VARCHAR` values.
671671

672-
<a name="NullValues"></a>
672+
<a id="NullValues"></a>
673673

674674
### Null Values
675675

@@ -689,7 +689,7 @@ To avoid database error 3532 in this situation, your application must use the th
689689

690690
cur.execute("{fn teradata_parameter(1, BYTE(4))}update mytable set bytecolumn = ?", [None])
691691

692-
<a name="CharacterExportWidth"></a>
692+
<a id="CharacterExportWidth"></a>
693693

694694
### Character Export Width
695695

@@ -721,7 +721,7 @@ Or wrap query in a view with `CAST` or `TRIM` to avoid trailing space padding:
721721

722722
This technique is also demonstrated in sample program `CharPadding.py`.
723723

724-
<a name="ModuleConstructors"></a>
724+
<a id="ModuleConstructors"></a>
725725

726726
### Module Constructors
727727

@@ -769,7 +769,7 @@ Creates and returns a `datetime.datetime` value.
769769

770770
Creates and returns a `datetime.datetime` value corresponding to the specified number of seconds after 1970-01-01 00:00:00.
771771

772-
<a name="ModuleGlobals"></a>
772+
<a id="ModuleGlobals"></a>
773773

774774
### Module Globals
775775

@@ -789,7 +789,7 @@ Integer constant `2` indicating that threads may share this module, and threads
789789

790790
String constant `"qmark"` indicating that prepared SQL requests use question-mark parameter markers.
791791

792-
<a name="ModuleExceptions"></a>
792+
<a id="ModuleExceptions"></a>
793793

794794
### Module Exceptions
795795

@@ -801,7 +801,7 @@ String constant `"qmark"` indicating that prepared SQL requests use question-mar
801801
* `teradatasql.OperationalError` is raised for errors related to the database's operation.
802802
* `teradatasql.ProgrammingError` is raised for SQL object existence errors and SQL syntax errors. Not supported yet.
803803

804-
<a name="ConnectionMethods"></a>
804+
<a id="ConnectionMethods"></a>
805805

806806
### Connection Methods
807807

@@ -835,7 +835,7 @@ Creates and returns a new Cursor object for the Connection.
835835

836836
Rolls back the current transaction.
837837

838-
<a name="CursorAttributes"></a>
838+
<a id="CursorAttributes"></a>
839839

840840
### Cursor Attributes
841841

@@ -868,7 +868,7 @@ Read-only attribute consisting of a sequence of seven-item sequences that each d
868868

869869
Read-only attribute indicating the number of rows returned from, or affected by, the current SQL statement.
870870

871-
<a name="CursorMethods"></a>
871+
<a id="CursorMethods"></a>
872872

873873
### Cursor Methods
874874

@@ -946,7 +946,7 @@ Has no effect.
946946

947947
Has no effect.
948948

949-
<a name="TypeObjects"></a>
949+
<a id="TypeObjects"></a>
950950

951951
### Type Objects
952952

@@ -980,7 +980,7 @@ Identifies a SQL `CHAR`, `CLOB`, `INTERVAL`, `PERIOD`, or `VARCHAR` column as a
980980

981981
`.description[`*Column*`][1] == teradatasql.STRING`
982982

983-
<a name="EscapeSyntax"></a>
983+
<a id="EscapeSyntax"></a>
984984

985985
### Escape Syntax
986986

@@ -1246,7 +1246,7 @@ To represent a double-quote character in a string enclosed in double-quote chara
12461246

12471247
{fn teradata_field_quote("""")}
12481248

1249-
<a name="FastLoad"></a>
1249+
<a id="FastLoad"></a>
12501250

12511251
### FastLoad
12521252

@@ -1301,7 +1301,7 @@ Your application ends FastLoad by committing or rolling back the current transac
13011301

13021302
Warning and error information remains available until the next batch is inserted or until the commit or rollback. Each batch execution clears the prior warnings and errors. Each commit or rollback clears the prior warnings and errors.
13031303

1304-
<a name="FastExport"></a>
1304+
<a id="FastExport"></a>
13051305

13061306
### FastExport
13071307

@@ -1332,7 +1332,7 @@ Your application can prepend other optional escape functions to the query:
13321332
After beginning a FastExport, your application can obtain the Logon Sequence Number (LSN) assigned to the FastExport by prepending the following escape functions to the query:
13331333
* `{fn teradata_nativesql}{fn teradata_logon_sequence_number}` returns the string form of an integer representing the Logon Sequence Number (LSN) for the FastExport. Returns an empty string if the request is not a FastExport.
13341334

1335-
<a name="CSVBatchInserts"></a>
1335+
<a id="CSVBatchInserts"></a>
13361336

13371337
### CSV Batch Inserts
13381338

@@ -1363,7 +1363,7 @@ Limitations when using CSV batch inserts:
13631363
* For SQL batch insert, some records may be inserted before a parsing error occurs. A list of the parser errors will be returned. Each parser error will include the line number (starting at line 1) and the column number (starting at zero).
13641364
* Using a CSV file with FastLoad has the same limitations and is used the same way as described in the [FastLoad](#FastLoad) section.
13651365

1366-
<a name="CSVExportResults"></a>
1366+
<a id="CSVExportResults"></a>
13671367

13681368
### CSV Export Results
13691369

@@ -1415,10 +1415,13 @@ Limitations when exporting to CSV files:
14151415
* Not all data types are supported. For example, `BLOB`, `BYTE`, and `VARBYTE` are not supported and if one of these column types are present in the result set, an error will be returned.
14161416
* `CLOB`, `XML`, `JSON`, and `DATASET STORAGE FORMAT CSV` data types are supported for SQL query results and are exported as string values, but these data types are not supported by FastExport.
14171417

1418-
<a name="ChangeLog"></a>
1418+
<a id="ChangeLog"></a>
14191419

14201420
### Change Log
14211421

1422+
`17.20.0.23` - May 19, 2023
1423+
* GOSQL-157 logon_timeout connection parameter
1424+
14221425
`17.20.0.22` - May 16, 2023
14231426
* Build DLL and shared library with Go 1.19.9
14241427

0 commit comments

Comments
 (0)