《DataStage官方培训教程7(共18张).pptx》由会员分享,可在线阅读,更多相关《DataStage官方培训教程7(共18张).pptx(18页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、DataStage EssentialsHashed FilesServer Edition This document and the software described herein are the property of Ascential Software Corporation and its licensors and contain confidential trade secrets. All rights to this publication are reserved. No part of this document may be reproduced, transmi
2、tted, transcribed, stored in a retrieval system or translated into any language, in any form or by any means, without prior permission from Ascential Software Corporation. Copyright 2003 Ascential Software Corporation. All rights Reserved Ascential Software Corporation reserves the right to make cha
3、nges to this document and the software described herein at any time and without notice. No warranty is expressed or implied other than any contained in the terms and conditions of sale. Ascential Software Corporation50 Washington StreetWestboro, MA 01581-1021 USAPhone: (508) 366-3888Fax: (508) 366-3
4、669 Ascential, DataStage, INTEGRITY, MetaRecon, MetaStage and MetaBroker are trademarks of Ascential Software Corporation. Pick is a registered trademark of Pick Systems. Ascential Software is not a licensee of Pick Systems. Other trademarks and registered trademarks are the property of the respecti
5、ve trademark holder. 2/26/2022Upon module completion, students will be able to:Define what a hashed file isList different types of hashed filesList various uses for hashed filesCreate hashed filesSource hashed filesUse caching attributes to accelerate reads and writesImport metadata from hashed file
6、sDelete hashed filesModule Objectives 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. What is a Hashed File?A DataStage file written to the file systemMost use a hashing algorithm based on key column valuesFiles can
7、 be cataloged in the projects VOC file for easy retrieval 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Types of Hashed Files21 different typesType 1 and 19 do not use a hashing algorithmTypes 2-18 are static hash
8、ed files and use a hashing algorithmType 25 is static and uses a B-tree algorithmType 30 is dynamic and uses a hashing algorithm 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Uses of Hashed FilesGood for locally s
9、toring tables of a remote database that will be read from frequentlyGood as an intermediate file location in sequences of jobsMain use is as a reference lookup table 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. H
10、ashing Algorithms (Static File Types)Character typeLocation where most variation occurs in key columnRightMiddleLeftAnyWholly numeric261014Numeric & separators371115ASCII481216Any591317 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribut
11、ion Is Prohibited. HashingAlgorithmInserting Records into Hashed FilesGroup 1Group 2Group 3Group 4Group 5 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Overflow GroupsGroup 1Group 2Group 3Group 4Group 5Header20484
12、0966144819210240GroupAddressoverflowGroup 212288When there is not enough space remaining in a group, the group overflows 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Creating Hashed FilesInsert the name of the ha
13、shed filecan use parameters Let the job create the hashed fileCan optionally use the CREATE.FILE command from a DataStage command shell or program 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. How many groups to c
14、reate initiallyOptions for Creating Hashed FilesWhat percentage of file capacity to create a new groupWhich type of file to createHow large the groups will beWhat percentage of file capacity to remove a groupSimilar to dropping a table 2002 Ascential Software Corp. All rights reserved.Corporation. A
15、ll Rights Reserved Reproduction and/or Redistribution Is Prohibited. Hashed File LocationsCreate and/or write records to a hashed file in a specific projectdoesnt have to be yours!Create and/or write records to a hashed file in a specific directorycan present issues 2002 Ascential Software Corp. All
16、 rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Write CachingEnabled from Input page of hashed file stageAllows records to be written to memory buffer initially and flushed to disk onceI/O is extremely expensivethis minimizes writes to diskCan pres
17、ent issues when reading from a hashed file at the same time 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Importing Metadata from a Hashed FileChoose the project from the drop-down listAvailable hashed files withi
18、n the project appearselect one or multiples 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Sourcing a Hashed FileInsert the name of the hashed file or use drop-down listcan use parameters Enable or disable read cac
19、hingfour methods 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Read CachingEnabled from Output page of hashed file stageFour methods are availablebe sure to choose the correct methodAllows records to be read into
20、memory buffer I/O is extremely expensivethis minimizes reads from diskCan present issues when writing to a hashed file at the same time 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. Deleting Hashed FilesNot advisa
21、ble to manually delete operating system directories and filesIssue DELETE.FILE command from DataStage Administrator or DataStage command shellCreate shell script to run delete_file.exe program and supply hashed file namedelete_file.exe program is installed when the server is installed and is located in the servers engine directory in the bin subdirectory 2002 Ascential Software Corp. All rights reserved.Corporation. All Rights Reserved Reproduction and/or Redistribution Is Prohibited. 演讲完毕,谢谢观看!
限制150内