The following table shows the mapping from Teradata attribute types into R types. This mapping is used by the tdr.GetAttributeByNdx and tdr.SetAttributeByNdx functions to convert an attribute value and type from its Teradata (or C) representation into its R representation and vice versa.
Teradata Data Types | R |
---|---|
|
Character vector |
|
Raw vector |
|
Integer |
|
Real |
DECIMAL8, DECIMAL16 | Raw vector |
DATE | Date (number of days since 1/1/1970) |
TIME | List with 3 elements:
These three elements are the members of the C structure used to represent the TIME data type. |
|
List with elements in the C structure used to represent the type in Teradata. The types of elements follow the mapping in Mapping Between R and C Data Types. |
|
Integer |
|
List with elements in the C structure used to represent the type in Teradata. The types of elements follow the mapping in Mapping Between R and C Data Types. |
|
Raw vector |
This mapping was defined based on the following criteria:
- The R data types are available in all R environments
- The data conversion is lossless
The selected R types are part of the basic R and not specific packages that need to be installed. You can convert the returned data to the representation used by a package of your choice.
The XML and JSON data types are treated as LOBs.
The following data types are not supported:
- ARRAY
- Geospatial
- NUMBER
- Period
- UDT