Description Usage Arguments Details Value See Also Examples
Gets column names from Teradata tables. Can take a JDBC
connection object (conn
) if provided. If no JDBC connection is provided,
then a connection is attempted using the user
, and password
provided. If none is provided, then tries to locate a connection object
(conn
) in the global environment.
If a connection profile (e.g. username, password, etc.) is provided, then
an attempt is made to connect to Teradata. Once the query is run, the
connection is then closed. If a connection object (conn
) is provided
to the function (or one is found globally), then the connection remains
open.
1 |
table |
String vector of name of table to get column names from. |
... |
Optional connection settings. |
Many of the core production tables in Teradata are locked, such that
trying to query for indicies will result in Error 3853
. This is a part of
the user restrictions and can be circumvented by creating a new subset of
the table and querying that subset. If the index is unable to be determined,
a value of NA
will be returned.
Returns a data.frame
object with the following items:
"DatabaseName"Database name
"TableName"Table name
"ColumnName"Column name
"ColumnFormat"Column format
"ColumnType"Column type.
"ColumnLength"Column length.
"Index"Indicator of whether column is a primary index (1
) or secondary index (2
)
tdConn
for connection, tdDisk
for disk usage,
tdSpool
for spool usage, tdCpu
for CPU
usage, and tdJoin
for joining tables.
1 2 3 4 5 6 7 8 9 10 | ## NOT RUN (will also result in errors due to user restrictions) ##
## Runs a quick query based on connection profile
# tdNames("ICDB_PERSON", username=<username>, password=<password>, db="GCA")
## Runs query using a separately established connection
# conn = tdConn(<username>, <password>, db="GCA")
# tdNames("ICDB_PERSON", conn=conn)
## Uses same connection, but allows code to find globally.
# tdNames("ICDB_PERSON")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.