<commit_before>#library("teradataR")
library("RODBC")
library("dplyr")
library("assertthat")


#con <- tdConnect(dsn, uid = uid, pwd = <PASSWORD>, database = database)
#a <- td.data.frame(test_table)
# tdQuery('select count(*) from airlines')
#tdClose()

#a1 <- as.td.data.frame(a, tableName = "airlines", database = "")

st <- src_teradata(host = dsn, user = uid, password = <PASSWORD>, dbname = "")
a <- tbl(st, "airlines")

copy_nycflights13(st)
#copy_nycflights13(src_teradata(host = dsn, user = uid, password = <PASSWORD>))
#copy_lahman(src_teradata(host = dsn, user = uid, password = <PASSWORD>))

getS3method("collapse","tbl_sql")

a <- td.table(st$con,table = "airlines",database = "")

collapse(select(a))

a <- tbl(st, "airlines")<commit_msg>Update test.r<commit_after>#library("teradataR")
library("RODBC")
library("dplyr")
library("assertthat")


#con <- tdConnect(dsn, uid = uid, pwd = <PASSWORD>, database = database)
#a <- td.data.frame(test_table)
# tdQuery('select count(*) from udparm.ao_sovn')

#td.stats(a, "Delinquency")
#tdClose()

#a1 <- as.td.data.frame(a, tableName = "ao_sovn2", database = "udparm")

st <- src_teradata(dsn = dsn, uid = uid, pwd = pwd)
a <- tbl(st, "airlines")
dim(a)
collect(a)
collapse(a)
compute(a)

a1 <- filter(a, carrier == "AA")
collect(a1)
collapse(a1)
compute(a1)
dim(a1)

{'fraction_non_alphanumeric': 0.19939577039274925, 'fraction_numerical': 0.009818731117824773, 'mean_word_length': 5.901041666666667, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '167627', 'n_tokens_mistral': 552, 'n_tokens_neox': 527, 'n_words': 105}