All Forums

Share best practices, knowledge, successes and issues in Analytics, and discuss Analytical Applications.

You must login to post to the forums.
Dependancies on DBC for Data Processing Topic by jayaubby 28 Mar 2014 dbc, tpt, data, Processing, etl, elt, analytics, active data warehouse, business rules; business modeling; data warehouse planning; business objectives

Hi guys,
I would like to understand peoples views on utilising DBC for dynamically generating scripts for data processing.
Considering DBC is Teradata's own metadata store and the development of this is owned and managed by Teradata do you feel it appropriate to develop frameworks for processing data based upon this?

1182 views
2 replies, 5 years ago
Cast Topic by gavakie 02 Dec 2008

I have a column with a date and I need to show it like mm/yyyy or yyyy/mm can someone help me do this?

76909 views
8 replies, 5 years ago
TeradataR mac RStudio/R JDBC driver td 13.10 Topic by fr0st003 29 Mar 2014

Hi,
 
I am relatively new to R and Teradata, but I have followed directions and am still unable to connect via both R and RStudio
I installed R via the github packages

1283 views
1 reply, 5 years ago
Real-time access to the dbc.qrylog Topic by Hemanth 25 Mar 2014

Accessing or extracting data from the DBC.QRYLOG is always an overhead, we need this information to be made available to the other systems to generate auditing related on a real-time basis.
Request your views on alternate approaches that can be put in place to reduce access overhead to DBC.QRYLOG.
 

798 views
0 replies
How do i drop multiple tables Topic by letangc 22 Feb 2007

I am new to the treadata environment, and would like to delete tables in my work environment (temporary work space)For example drop table s_mrktng.cletang_1486386770;drop table s_mrktng.cletang_1486409292;drop table s_mrktng.cletang_1486409363;drop table s_mrktng.cletang_1486409456;drop table s_mrktng.cletang_1486409527;but instead of type the file name over and over can i dodrop table s_mrktng

37347 views
2 replies, 5 years ago
Why FastLoad Does not support NUSI ? Topic by Sankalp.C 17 Dec 2013

The question that is hounting my mind now a days is - Why Fastload does not support NUSI on table?
The popular ans which I came across is - in case of NUSI to table are there 1. The target table 2. The sub table created due to NUSI.
As Fast load only supports one Table upload so, NUSI is entertained in Fast Load. But I do have doubt on that one.
Reason -

2151 views
7 replies, 5 years ago
Connecting to Teradata in R via the teradataR package Topic by porterhau5 11 Jun 2012 r, teradatar

It appears that I can successfully connect to Teradata via R, but when I try to perform some function on my td.data.frame, it provides the following error after the last line of my code:

 "42S02 -3807 [NCR][ODBC Teradata Driver][Teradata Database] Object 'my_sample_table' does not exist. "

My code:

15034 views
14 replies, 5 years ago
Levenstein Distance Algorithm Topic by ANIMESH.DUTTA 16 Jun 2009

Levenstein Distance Algorithm is a famous algorithm used for measuring the amount of difference between two sequences (i.e., the so called edit distance).The Levenshtein distance between two strings is given by the minimum number of operations needed to transform one string into the other.This algorithm uses Arrays - which is the main challenge to be applied in Teradata Stored ProcedureCan you please anyone give any code to use this in Teradata Stored Procedure/Function or SQL!Oracle PL/SQL Code is available - that uses Arrays. How do I implement Arrays in Teradata? FYI : [url=http://en.wikipedia.org/wiki/Levenshtein_distance][/url]

13350 views
6 replies, 5 years ago
Impact of using business Analytics on the business. Topic by adityasinha 10 Sep 2013

Is there someone who implemented marketing analytics to enhance the marketing campaign's productivity. I am not an Analyst but impressed with this concept. I recently visited some Business analyst websites and was impressed by boston analyst. Plz, share your experience here. 

1601 views
2 replies, 5 years ago
GROUP BY ROLLUP Topic by rwenzlofsky 07 Feb 2009

Hi,I would need Aggregations on 4 different levels:The hierarchy looks like this:ALL ---- Type 1 ------- Group 1 --------- Product 1 --------- Product 2 ------- Group 2 --------- Product 3 --------- Product 4 ---- Type 2 ------- Group 3 --------- Product 5 --------- Product 6 ------- Group 4 --------- Product 7 --------- Product 8(1) Product Level:select ReportingMonth ,Product ,Type ,Group ,count (distinct (case when Product_Subscriber = 1 then customer_id else null end)) as Customers ,sum(Activation) as Activations ,sum(Deactivation) as Deactivations ,sum(Churn) as Churnsfrom db.table group by 1,2,3,4;(2) Group Level:select ReportingMonth ,Type ,Group ,count (distinct (case when Product_Subscriber = 1 then customer_id else null end)) as Customers ,sum(Activation) as Activations ,sum(Deactivation) as Deactivations ,sum(Churn) as Churnsfrom db.table group by 1,2,3;(3) Type Type Level:select ReportingMonth ,Type ,count (distinct (case when Product_Subscriber = 1 then customer_id else null end)) as Customers ,sum(Activation) as Activations ,sum(Deactivation) as Deactivations ,sum(Churn) as Churnsfrom db.table group by 1,2;(4) All:select ReportingMonth ,count (distinct (case when Product_Subscriber = 1 then customer_id else null end)) as Customers ,sum(Activation) as Activations ,sum(Deactivation) as Deactivations ,sum(Churn) as Churnsfrom db.table group by 1;Is it possible to achive this with GROUP BY ROLLUP functionality?Thanks in advance

21880 views
5 replies, 5 years ago
multiple join in sub quary Topic by Nayana 17 Jan 2014

I am trying to join the following table in the sub query, but I am getting the following error message
expected something between cus_ian_id_no and ')'
Could somebody help me in this please?

 

 

SELECT

MIN(trs_dt)

,MAX(trs_dt)

 

    ,COUNT(DISTINCT a.cus_ian_id_no) Transactions

1020 views
4 replies, 5 years ago
Finding top consuming queries Topic by JustMe 17 Jan 2014 consuming, queries, resusage

Is there any way of measuring what percentage of the resources are currently being used by top consuming queries ? For example, assuming currently a query can get 100% of the resources...how do I find the top consuming SQL queries using? 50%, 75% , etc ?
Currently on TD13.10

1063 views
0 replies
Help with SQL to deal with overlapping date range Topic by raj.shah.0609 15 Jan 2014 overlapping date range

Hi,
I have a data set as below. Can someone help me on mergin date range as shown in output.
Promo_id Promo_Start_Date Promo_End_Date
P1            2013-04-01           2013-04-30
P2            2013-04-15           2013-04-30
P3            2013-05-15           2013-05-30
Need Output as this:
Promo_id Promo_Start_Date Promo_End_Date

1327 views
4 replies, 5 years ago
Why UV in MLOAD? Topic by Sankalp.C 12 Dec 2013

As I am under a impression that Mload does support duplicate entries, correct me if I am wrong. Then why we need a UV table? population on UV will pause the job.

1553 views
6 replies, 5 years ago
Call a macro from a stored procedure? Topic by NMadson-3173 27 Oct 2006

Can one call a macro from a stored procedure?In the Teradata documentation "SQL Reference: Stored Procedures and Embedded SQL" I see the following:Rules for Using DECLARE CURSOR (Macro Form)The following rules apply to the Macro DECLARE CURSOR statement:• When the cursor is opened, the macro is performed. Once the macro has been performed,the results of macro executionI interpreted this to mean that I can use the DECLARE CURSOR to execute the macro from within a stored procedure.However when I attempt to create the stored procedure Create Procedure test_call_01 (IN StartDate DATE)BEGIN DECLARE cur_01 CURSOR FOR m_test_01END;I get error messages below. The first about a SELECT statement implies that I can't use a macro but have to spell out a complete SELECT statement.A further bit of information: my macro m_test_01 creates a volatile table using a select statement. Is the problem that I can't use a CREATE VOLATILE TALBE statement within a macro that is called from within a Stored Procedure? SPL1007:E(L4), Unexpected text 'm_test_p1' in place of cursor SELECT statement. SPL1007:E(L4), Unexpected text 'END' in place of cursor SELECT statement. SPL1048:E(L4), Unexpected text ';' in place of SPL statement. SPL1027:E(L4), Missing/Invalid SQL statement'E(3707):Syntax error, expected something like an 'END' keyword between ';' and the end of the request.'.N.

49166 views
14 replies, 5 years ago
run queries in parallel and serial Topic by eejimkos 20 Mar 2012

Hello,

 

I have a question ,

I want to execute three sql statements,sql1 - sql2 -sql3.

I want to run them from bteq.

How can i run sql1 and sql2 in parallel and then sql3?

I tried with cmd,calling seperate files of bteq but nothing.

By ".run file" the same.

8304 views
5 replies, 5 years ago
FASTEXP Topic by Sankalp.C 19 Dec 2013
1236 views
5 replies, 5 years ago
While we add New AMP Topic by Sankalp.C 10 Dec 2013

While we add New AMPs does the existing HASHMAP got changed as new AMPs are being added. If so, How the existing AMPs got changed according to that as the HASHMAP and The  ROWID have to incorporate the change accordingly to make sure there are No data Loss.

1683 views
10 replies, 5 years ago
secondary index Topic by Sankalp.C 12 Dec 2013

Hi,
I am getting kind a confused here.
Ex . USI and NUSI - All it does is -
a. creats a subtable (Q1. not sure where ? if in all amps then the same table is replicated in all amps?)

1231 views
3 replies, 5 years ago
join indices Topic by Sankalp.C 11 Dec 2013

Suppose, I had a join qry which is using join indices currently. Incase I change the joining column the it might not use join indices. Is there any way to force join indices?

1325 views
3 replies, 5 years ago
Round Up and Round to Nearest? Topic by Benjamin Marcus 08 Jul 2007

Dear all who know,If I had this number, 15.4632,If Round Up to 2 decimal, I get 15.47.If Round to Nearest 2 decimal, I get 15.46.How to do this 2 functions in SQL?Many thanks in advance.^_^

51196 views
5 replies, 5 years ago
Merge Joining on non-indexed column. Topic by Sankalp.C 06 Dec 2013

In a situation when Merge Joining is un-Avoidable on non-indexed column, Is using Collect Stats on those column is of any use.

1181 views
2 replies, 5 years ago
TeraData Tuning Topic by Sankalp.C 25 Sep 2013

Hi All,
If I put my question in Short and Simple manner, that ends up saying - "Want to know Details about Tuning and Optimization".
Briefly, I can go for a google search but the result I was looking for a consolidated one - like Black Book in teradata with Details how load distribution take place( load distribution in AMPs).

2335 views
5 replies, 5 years ago
INSERT SELECT and other values Topic by NMadson-3173 07 Sep 2006

Can anyone tell me what the correct syntax would be when I'm attempting to insert one value using a SELECT statement and the other values as fixed? Using the syntax below, I get an error message, "3706: Syntax error: expected something between the 'VALUES' keyword and the 'SELECT' keyword.

107376 views
9 replies, 6 years ago
Data level security using query Topic by arbiswas 11 Nov 2013

Dear Experts,

I am facing a challenge in setting data level security.

1760 views
3 replies, 6 years ago

Pages