Page 1 of 1

Record Count of Hashed File

Posted: Tue Feb 03, 2009 9:02 am
by joesat
Is there any way that we can get the record count of a hashed file?
I do realize that we can write it to a sequential file and then get the count.

When it comes to datasets, we are able to use the orchadmin commands to get the count. Similarly, is there any way to get the record count of a hashed file?

Thanks!

Posted: Tue Feb 03, 2009 10:28 am
by chulett
If the hashed file was created in an account, then "COUNT <Name>" in the Administrator's command window would work. For a pathed hashed file, you'll need to create a VOC entry first, then count.

Posted: Tue Feb 03, 2009 11:02 am
by Vinodanand
Just as Chulett said you need to create a VOC entry using the SETFILE command

SETFILE <pathname> <VOC Name> and
then do a COUNT <VOC Name>

Posted: Tue Feb 03, 2009 10:34 pm
by joesat
I do not have administrator priviledges :-(...can i still do what you guys have suggested?.. thanks for the replies!

Posted: Tue Feb 03, 2009 11:10 pm
by chulett
None of that requires administrator privileges, so... yes.

Posted: Thu Feb 05, 2009 11:26 pm
by joesat
sorry that I have to reopen this topic, but can someone help me with the technical details related to setting the pathname and VOC name... 'cause I havent had the opportunity to work in DS Administrator before..

Posted: Fri Feb 06, 2009 12:09 am
by ray.wurlod
In the Administrator client select your project and click the Command button. This opens a dialog in which you can enter "TCL commands" in the project. It's here that you enter the SETFILE command and the COUNT command.

Code: Select all

SETFILE pathname_of_hashed_file name_of_hashed_file
COUNT name_of_hashed_file

Posted: Fri Feb 06, 2009 12:58 am
by joesat
your message got cutoff, Ray... i know i have to subscribe, alas my heart is willing but my purse is weak

can you display the post in full please?

Re: Record Count of Hashed File

Posted: Fri Feb 06, 2009 1:47 am
by monaz
joesat wrote:Is there any way that we can get the record count of a hashed file?
I do realize that we can write it to a sequential file and then get the count.

When it comes to datasets, we are able to use the orchadmin commands to get the count. Similarly, is there any way to get the record count of a hashed file?

Thanks!
You can use a
InputHash----->Transformer------->OutputHashFile
In transformer stage you can use stage vaiable for the count and load back the same data to other hash file.
Else you can use a aggregator stage with a function count instead of stage variable.

Posted: Fri Feb 06, 2009 2:45 am
by ray.wurlod
joesat wrote:your message got cutoff, Ray... i know i have to subscribe, alas my heart is willing but my purse is weak

can you display the post in full please?
No.

Premium membership is one of the ways that the hosting and bandwidth costs incurred by DSXchange are met. You will note that there is no advertising. I do not intend to create a precedent whereby the very survival of DSXchange is put at risk.

Posted: Fri Feb 06, 2009 2:47 am
by joesat
Thanks monaz.. but I want to get the count without creating a new DS job and just by executing some commands or a shell script... this is because we need to get the count of some hashed files every month without using ETL jobs and just Shell scripts...

For the file counts and datasets, we can get the data from links, wc and orchadmin commands.. count of hashed files has been elusive so far... :roll:

Posted: Fri Feb 06, 2009 1:16 pm
by chulett
Not so elusive, what you need has been posted in this thread more than once: SETFILE and COUNT. Search the forums for SETFILE, its syntax and usage *are* out there. For scripting help, search the forums for dssh which is where the commands would be run outside of the Adminstrator GUI.

Posted: Mon Feb 09, 2009 12:33 am
by joesat
Thanks to all you guys... I will mark the topic 'Resolved' as of now, since I have to do research on the provided suggestions. If I come across any other issue or other possible solutions I will update this.