teradata

SAS connection to Teradata Database using Teradata ODBC

百般思念 提交于 2019-12-01 11:37:30
I'm trying to connect to Teradata in SAS. I set up an teradata ODBC on the machine. The assumption currently for me is that using ODBC is the only way for me to access the database. And here is the syntax of my connection command: Libname Teradata ODBC dsn = 'dsnname' uid = 'uid' pwd = 'pwd'; results: Error: The ODBC engine cannot be found. Error: Error in the LIBNAME statement. It keeps saying that the ODBC engine cannot be found. I'm really confused now. Is there anything wrong with the command? Or I have to do something else outside SAS? I check the licence Proc Setinit; result: SAS/ACCESS

Soap Header with Authorization Basic in native PHP

痴心易碎 提交于 2019-12-01 11:10:28
问题 i need to connect to TeraData SOAP API which now demands a Authorization Basic Header to be sent with the login credentials. I do not know how to adress the problem. I got the access working in SoapUI when adding Basic Authorization Header - please can anyone help me to get the code straight: Here's the Header SoapUI sends and the response is good: POST http://example.com/api/soap/v6 HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: "" Content-Length: 302

teradata 一些基本命令

随声附和 提交于 2019-12-01 09:34:05
HELP 帮助用户了解数据库中各种对象的结构 SHOW 帮助用户了解某种对象的定义,即返回其DDL语句 EXPLAIN 返回一个SQL语句经优化处理后的执行步骤,注意并未真正执行 FALLBACK 对数据加以保护的一种方式,是冗余的备份 RENAME 对表重命名 NULLIFZERO 对数据作累计处理时,忽略零值 ZEROIFNULL 对数据作累计处理时,将空值作零处理 WITH...BY 对详细数据记录作分类统计(Sub-Total)时有用 MODIFY USER/DATABASE 对用户/数据库对象作动态修改而无需数据库重组 HELP 命令 参数 说明 HELP DATABASE databasename; 可以显示一个指定数据库所包含的所有对象 HELP USER username; 显示某个用户中所包含对象的信息 HELP TABLE tablename; 显示某张表的信息 HELP VIEW viewname; 显示某个视图的信息 HELP MACRO macroname; 显示某个宏的信息 HELP COLUMN table or viewname.*; 显示表/视图的各列的信息 HELP COLUMN table or viewname.colname . . ., colname; 显示表/视图某几列的信息 HELP INDEX tablename;

Is it possible to group string within a string in Teradata?

我的梦境 提交于 2019-12-01 07:27:48
问题 The original table (exactly the one that I am using .. with all commas brackets etc) id attributes 1 123(red), 139(red), 123(white), 123(black), 139(white), 2 123(black), 139(white), 123(green), 32 223(blue), 223(red), 553(white), 123(black), 4 323(white), 139(red), 23 523(red), I need to group the attribute numbers so that my table looks like id attributes 1 123(red, white, black); 139(red, white); 2 123(black, green); 139(white); 32 223(blue, red); 553(white); 123(black); 4 323(white); 139

Connecting to Teradata using Python

别说谁变了你拦得住时间么 提交于 2019-12-01 02:34:17
I am trying to connect to teradata server and load a dataframe into a table using python. Here is my code - import sqlalchemy engine = sqlalchemy.create_engine("teradata://username:passwor@hostname:port/") f3.to_sql(con=engine, name='sample', if_exists='replace', schema = 'schema_name') But I am getting the following error - InterfaceError: (teradata.api.InterfaceError) ('DRIVER_NOT_FOUND', "No driver found for 'Teradata'. Available drivers: SQL Server,SQL Server Native Client 11.0,ODBC Driver 13 for SQL Server") Can anybody help me to figure out whats wrong in my approach? There's is

Teradata Update Table from Select Statement

拥有回忆 提交于 2019-11-30 23:44:06
Sorry if the title is unclear. Basically I'm trying to select certain records from multiple tables then update a certain column value for the returned records. T-SQL Implementation UPDATE CUSTOMERS SET LIKES_US = 'Y' FROM RESTAURANT REST INNER JOIN CUSTOMERS CUST ON REST.LINK_ID = CUST.LINK_ID WHERE REST.REST_TYPE = 'Diner' AND CUST.LIKES_US IS NULL Oracle UPDATE (SELECT CUST.LIKES_US FROM CUSTOMERS CUST INNER JOIN RESTAURANT REST ON CUST.LINK_ID=REST.LINK_ID WHERE REST.REST_TYPE = 'Diner' AND CUST.LIKES_US IS NULL) NEW_CUST SET NEW_CUST.LIKES_US = 'Y'; I am tried doing the same thing in

Connect R and Teradata using JDBC

空扰寡人 提交于 2019-11-30 23:03:11
I´m trying to connect R and Teradata using RJDBC. I´ve found this link that has an example using mysql, but i´m nos sure how to do the same with teradata. library(RJDBC) drv <- JDBC("com.mysql.jdbc.Driver", "/etc/jdbc/mysql-connector-java-3.1.14-bin.jar", identifier.quote="`") conn <- dbConnect(drv, "jdbc:mysql://localhost/test", "user", "pwd") I´ve downloaded this driver: http://downloads.teradata.com/download/connectivity/jdbc-driver But i´m not sure where i should reference the directory. I know there is a teradataR package out there , but i don´t know if it really works with the R 3.0.0.

SQL Challenge/Puzzle: How to merge nested ranges?

北战南征 提交于 2019-11-30 22:25:58
This challenge is based on a real life use-case involving IP ranges. The solution I came with is based on the stack trace challenge I've presented previously. Each range start is treated as a PUSH operation and each range end + 1 is treated as a POP operation. The Challenge We have a data set of ranges where each range has a starting point, ending point and a value. create table ranges ( range_start int not null ,range_end int not null ,range_val char(1) not null ) ; A range can contain another range or follow another range, but cannot be equal to another range or intersect with another range.

SQL Challenge/Puzzle: Given a stack trace - How to find the top element at each point in time?

妖精的绣舞 提交于 2019-11-30 21:45:45
My real life use-case was to merge nested ranges . I've drew some sketches and then I saw the resemblance between ranges starting and ending to stack PUSH and POP operations. I understood that solving this problem will also solve the original problem. The op column can actually be removed from the question. When val is NULL then it is a POP operation otherwise it is a PUSH operation. The Puzzle A table, stack_trace ,contains the following columns: i - Integer value that represents a point in time. op - 2 possible operations: I ("in"/"push") and O ("out"/"pop"). val - The value inserted by the

Teradata Update Table from Select Statement

不问归期 提交于 2019-11-30 18:35:37
问题 Sorry if the title is unclear. Basically I'm trying to select certain records from multiple tables then update a certain column value for the returned records. T-SQL Implementation UPDATE CUSTOMERS SET LIKES_US = 'Y' FROM RESTAURANT REST INNER JOIN CUSTOMERS CUST ON REST.LINK_ID = CUST.LINK_ID WHERE REST.REST_TYPE = 'Diner' AND CUST.LIKES_US IS NULL Oracle UPDATE (SELECT CUST.LIKES_US FROM CUSTOMERS CUST INNER JOIN RESTAURANT REST ON CUST.LINK_ID=REST.LINK_ID WHERE REST.REST_TYPE = 'Diner'