|
|
Archives of the TeradataForum
Message Posted: Sat, 15 Dec 2007 @ 08:13:54 GMT
Subj: | | Re: UDF Failure 3706 Syntax error: Invalid statement |
|
From: | | McCall, Glenn David |
| Also, UDF's are pretty serious stuff and I only know one site that would allow them. If you aren't sure about them stay well away as you
can do some serious and hard to track damage | |
| For what it's worth, I'd like to second this. | |
| Historically, C developers have been exterminated from database projects for many years. | |
As a seasoned 'C' and Teradata user, I would like to both support and reject these positions on UDF's. Of all the sites that I have been to, I
think I have encountered only a handful that have any people that know the 'C' programming language - and that includes the IT departments, let
alone just the Teradata groups. Of those only one or two had people that knew 'C' well enough that I would say they were capable of writing a UDF,
UDT, XSP or table Function.
Even worse there have been a few postings on Teradata lists asking "why doesn't my UDF work properly". When they finally posted the code it was
clear that the were using a methodology commonly known as "luck" or "trial, trial, more trial and error". Clearly beginners.
On the other hand, I have used UDF's several times. Examples include data loading performance improvements of many hundred fold by eliminating
some joins in the insert queries by placing that functionality in the UDF. Another example is a one way hashing algorithm (256 bit Secure Hash
Algorithm - one way encryption). Another is to implement some statistical functions (Discrete Normal Distribution, Cumulative Normal Distribution
and Inverse Cumulative Normal Distribution) that allowed us to implement queries within the database that we would not have otherwise been able to
do. There are more examples of proprietary algorithms that my "friends" probably wouldn't like disclosed.
So appropriate use of UDF's, UDT's, XSP's and Table Fn's enable more to be done (in parallel) in the database allowing people to do more "in
the box" than the previously might have been able to do. The alternative (which "ordinary users" might not be able to do) is to export data,
process in a package and reload. Much better to have a function that can simply be called (e.g. select x, somefancyfunction (x) from
sometable;)
However as Victor points out good 'C' programmers are seemingly few and far between. More poignantly, 'C' programmers (a sequential, serial,
essentially row at a time non-parallel programming language) that understand how Teradata works (sets, parallel) are likely to be fewer and
further between.
With that in mind, my rates are $1,000 USD per minute, first class airfares, office in pleasant tropical region with clear views over the
beach/Bay/Marina. Snowy views over the Fjords or Alps are also acceptable. :-) Oh, I also have this really nice bridge for sale too :-)
glenn Mc
| |