Teradata 14 basics certification information - response (19) by madhavikaduru
Execute Dynamic Select into string in Teradata - forum topic by Vivek79
This is the MYSQL query, now I need this below dynamic query to be execute in TERADATA SQL.
set l_sql=concat('SELECT max(',l_rid_col,'), MAX(cid) INTO @c2, @c3 FROM ',p_database,'.',p_table);
SET l_rid = @c2;
SET l_cid = @c3;
And this update query:
update table_a set row =ifnull(l_rid, 0),
column= ifnull(l_cid, 0) where databasename=p_database and tablename=p_table;
But in Teradata, I tried this way:
update table_a as a from (select max(l_rid) TR, MAX(l_cid) TCC from DEVP.employees )as b
set a.row= b.TR , a.column=b.TCC where a.databasename='DEVP' and a.tablename='employees';
But i'm getting this error:
STATEMENT 1: Update Statement failed. Elapsed time = 00:00:00.015 Executed as Single statement. Failed [3993 : HY000] Illegal usage of alias name.
Are we having any solution for this, in teradata?
Execute Dynamic Select into string in Teradata - response (1) by Vivek79
I got the answer, here
update table_a from (select max(l_rid) TR, MAX(l_cid) TCC from DEVP.employees )as b set row= b.TR , column=b.TCC where databasename='DEVP' and tablename='employees';
ISSUE: I just removed the alias name in UPDATE. finally got it.
How to decide compression? - response (2) by vlcik
Hi Yurij,
The quick answer on compression would be: use sampling and 1% rule.
Now if you continued reading, I can give you a bit more insight into your task. If you want to get optimal multi-value compression list, you would need to understand how presence bits work in TD. It might be beneficial to add less frequent values than 1% also or remove a few. The optimal number of values in compression list also depends on given the datatype (you get way more savings from compressing CHAR(20) than CHAR(2)). I've added some coments on presence bits here, check it out:
http://forums.teradata.com/forum/database/how-compression-works/
Also consider, whether the value could be subject to change (the optimum needs to be reviewed on a regular basis for critical tables) plus there are obviously wrong columns to consider compression (i.e. BUSINESS_DATE on a daily refreshed table).
Last but not least, there is procedure/macro available to do this semi-automatically table by table. Most importantly, if you want to check your DWH fully and do this task automatically, there are few great tools. We've been using tool named ATO on our project, it worked as a charm and it reviews also data-types, 1-click deployment, check out http://www.ato-tool.com/
Find table size and last access date - response (7) by varanasianup
All,
ObjectUseCountCollectRate is enabled(>0), Usecount is also enabled, but still i could find LastAccesstimestamp= null for few tables in a DB.
I observed if a table is defined on a NOPI, then LastAccesstimestamp=NULL, Somebody correct me here please.
Program hangs when I close connection to teradata db - forum topic by ramanzanwar
Hi
When I close connection to teradata db, my program hangs. This is happening randomly not every time. When I collected dump I found it hangs in tdata32.dll file which is teradata odbc driver file.
tdata32.dll file version is '14.10.0.0'
Below is call stack trace where program hangs.
ntdll.dll!_NtWaitForSingleObject@12
Program hangs when I close connection to teradata db - response (3) by ramanzanwar
ntdll.dll!_NtWaitForSingleObject@12
Program hangs when I close connection to teradata db - response (4) by ramanzanwar
ntdll.dll!_NtWaitForSingleObject@12
Program hangs when I close connection to teradata db - response (5) by ramanzanwar
Call stack in attached image.
Configurer Data Transfer Error Files - forum topic by Sean_Kelly
Hello All,
I'm new to Teradata Studio's, is there a way of changing the error files generated by the data transfer process to a dedicated folder?
Regards
Sean
Teradata Studios Default Time Display - forum topic by Sean_Kelly
Hi All,
How do I change the default display of a time field in Teradata Studios;
when I do a select time I get the following result;
141119
I want it to be viewed like;
14:11:19
Regards Sean
Import Tab delimited file through Teradata fast load utility is not working. - forum topic by Jayakumar.mm
I am facing an issue in executing below scritp through fast load utility for tab delimited .txt file.
1. First issue in .RECORD 1;
2. IF I remove .RECORD 1; from the code, I am getting "Specified string does not have matchSpecified string does not have match FDL4800 Invalid FastLoad statement"
Please help on this issue.
.SESSION 4;
.LOGON server/user;
BEGIN LOADING TABLENAME
.RECORD 1;
.IMPORT INFILE name_arch FORMAT VARTEXT '09'XCV";
DEFINE
COLUMN1 VARCHAR (10)),
COLUMN2 VARCHAR (10)),
COLUMN3 VARCHAR (10)),
COLUMN4 VARCHAR (10)),
COLUMN5 VARCHAR (20)),
COLUMN6 VARCHAR (10)),
COLUMN7 VARCHAR (5)),
COLUMN8 VARCHAR (30)),
COLUMN9 VARCHAR (10)),
COLUMN10 VARCHAR (10)),
COLUMN11 VARCHAR (20)),
COLUMN12 VARCHAR (20)),
COLUMN13 VARCHAR (10)),
COLUMN14 VARCHAR (20)),
COLUMN15 VARCHAR (10))
FILE="C:\sample.txt"
.BEGIN LOADING TABLE_NAME
INSERT INTO TABLE_NAME
VALUES
(
:COLUMN1,
:COLUMN2,
:COLUMN3,
:COLUMN4,
:COLUMN5,
:COLUMN6,
:COLUMN7,
:COLUMN8,
:COLUMN9,
:COLUMN10,
:COLUMN11,
:COLUMN12,
:COLUMN13,
:COLUMN14,
:COLUMN15
);
END LOADING;
.LOGOFF;
Import Tab delimited file through Teradata fast load utility is not working. - response (1) by dnoeth
There's a missing semicolon:
.BEGIN LOADING TABLENAME; .RECORD 1; .IMPORT INFILE name_arch FORMAT VARTEXT '09'XCV";
Chat application in html5 - forum topic by Gustavo Woltmann
Hi. This is maybe a bit off topic but since I am registered here I am sure there could be some people here who experienced this already.
I would like to add chat application to my website. Would like to use it on my page, blog and facebook page at the same time for the community to talk there. I also heard that some application have the ability to export the chat logs to increase the SEO with. I found Rumbletalk which seems decent and I would like to know if anyone is using it or if you would suggest me something else? My budget is about $50 a month as I know the free ones are not worth it.
Thanks!
Configurer Data Transfer Error Files - response (1) by fgrimmer
Sean, There is a preference to set the location of the error files during Smart Load or FastLoad. Go to Window>Preferences and Teradata Datatools Preferences>Data Utilities Preferences. There is a field to enter the 'Error File Path of Smart/ FastLoad'.
Teradata Studios Default Time Display - response (1) by fgrimmer
Sean, Time is returned as a long. You can cast it as a Varchar, for example:
select (cast(time as varchar(8));
Recursive SQL with update query - forum topic by Keep Smiling
I want to use the results obtained from a recursive query to update a table data. How can i do it.
for eg.
with RECURSIVE CTE (A,B,FLG) AS(
SELECT A,B,1 FROM TABLE1
UNION ALL
SELECT A,B,CASE WHEN A=3 THEN 1 ELSE 0 END FROM CTE WHERE FLG=1)
UPDATE TABLE1
FROM (SELECT A FROM CTE WHERE FLG=1 QUALIFY ROW_NUMBER() OVER( PARTITION BY A ORDER BY A)=1) TMP
SET A=TMP.A;
Can anyone help me in it.
Import Tab delimited file through Teradata fast load utility is not working. - response (2) by Jayakumar.mm
Thanks a lot. It works great now.
Import Tab delimited file through Teradata fast load utility is not working. - response (3) by Jayakumar.mm
Hi Team,
I am able to execute the script successfully now but 60% of records go to error table2 and only 40% records inserted into actual table. I am not able to find any difference in records inserted into error and actual table.
Please help to identify the issue.
Tperf calculation for my system - response (4) by LiquidCross
Teradata Tperf isn't a number that can be calculated, it's assiged to each node generation based on tests that have been executed against the node generations hardware. Adding a link that I came across today looking for the tperf numbers for older generation hardware.
http://apps.teradata.com//TDMO/v07n03/Tech2Tech/AppliedSolutions/TeradataPlatform.aspx
Hi,
I am planning to get through TE0-143.
I am not able to locate proper material to refer with reference to syllabus.
TE0-143 Teradata 14 Physical Design and Implementation Exam Objectives
• Physical Database Design Overview
o extending the logical data model, denormalization, primary index choices, derived data, database hierarchy (databases and users).
• Table Attributes
o Set tables, Multi-set tables, Queue tables, temporary tables, ALTER TABLE, CREATE TABLE, table-level options.
• Column Attributes
o data types, Referential Integrity, UNICODE
• Statistics
o multi-column statistics, SAMPLE statistics, SUMMARY statistics, MAXINTERVAL, ROLLUP, tables and views used for statistics collection.
• Primary Indexes
o UPI, NUPI, NoPI.
• Table Partitioning
o PPI, MLPPI, Character PPI, NO RANGE, Column Partitioning, ALTER TABLE TO CURRENT.
• Compression
o Multi-value Compression, Block Level Compression, Algorithmic Compression, temperature-based Block Level Compression, column partitioning (compress options).
• Secondary Indexes
o USI, NUSI.
• Other Index Types
o STJI, AJI, Multi-table join indexes, other join indexes (compressed, non-compressed, covering).
• Physical Database Operations
o query optimization (row access, aggregation), index utilization (partial value searches, data type conversions), table joins, skewed processing.
• Teradata Query Analysis
o E.g., EXPLAIN, DBQL, nested views, Teradata Analyst Pack, Viewpoint.
• Temporal Design Considerations
o E.g., temporal tables (VALIDTIME, TRANSACTIONTIME, BITEMPORAL), temporal views (SEQUENCED, NON-SEQUENCED, CURRENT time).
Kindly help?
Thanks for your co-operation,