Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Working With Flat Files

Working With Flat Files

Ratings: (0)|Views: 3,010|Likes:
Published by ypraju

More info:

Published by: ypraju on Dec 21, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Working with Flat Files
By PenchalaRaju.Yanamala
Working with Flat Files Overview
To use flat files as sources, targets, and lookups in a mapping, you must importor create the definitions in the repository. You can import or create flat file sourcedefinitions in the Source Analyzer. You can import or create flat file targetdefinitions in the Target Designer. You can import flat files lookups or useexisting file definitions in a Lookup transformation.
Because source definitions must match the source, you should import filesource definitions instead of creating them manually.
Creating Sessions with Flat File Sources and Targets
When you create sessions using file sources and targets, you can override someproperties you define in the Designer. When you create a session with a filesource, you can specify a source file location different from the location you usewhen you import the file source definition.
Importing Flat Files
You can import fixed-width and delimited flat file definitions that do not containbinary data. When importing the definition, the file must be in a directory local tothe client machine. In addition, the Integration Service must be able to access allsource files during the session.When you create a file source, target, or lookup definition, you must define theproperties of the file. The Flat File Wizard prompts you for the following fileproperties:File name and locationFile code pageFile typeColumn names and datatypesNumber of header rows in the fileColumn size and null characters for fixed-width filesDelimiter types, quote character, and escape character for delimited files
Special Character Handling
When you import a flat file in the Designer, the Flat File Wizard uses the filename as the name of the flat file definition by default. You can import a flat filewith any valid file name through the Flat File Wizard. However, the Designer does not recognize some special characters in flat file source and target names.When you import a flat file, the Flat File Wizard changes invalid characters andspaces into underscores ( _ ). For example, you have the source file “sampleprices+items.dat”. When you import this flat file in the Designer, the Flat FileWizard names the file definition sample_prices_items by default.Related Topics:Special Character HandlingSpecial Character Handling
Selecting Code Pages
When you import a flat file in the Designer, you can select the code page of thefile. The Designer lists the five code pages you have most recently selected.Then it lists all remaining code pages in alphabetical order.The code page represents the code page of the
contained in the file. Whenyou configure the file definition, specify delimiters, null characters, and escapecharacters that are supported by the code page.For delimited files, specify delimiters, optional quotes, and escape charactersthat are contained in the source file code page. For fixed-width files, specify nullcharacters as either a binary value from 0 to 255 or a character from the selectedcode page.When you configure the flat file definition, use delimiters, escape characters, andnull characters that are valid in the code page necessary to run a workflow.
ASCII data movement mode.
Use characters from the code page you definefor the flat file. Any 8-bit characters you specified in previous versions of PowerCenter are still valid.
Unicode data movement mode.
Use characters from the code page youdefine for the flat file.
Changing Display Fonts
You can use the Flat File Wizard to preview the data contained in a flat file. Bydefault, the Flat File Wizard displays fonts based on the system locale. For example, the PowerCenter Client is installed on a Windows machine that usesthe default Latin-1 system locale. By default, the font in the Flat File Wizard is setto Courier. The preview window displays Latin-1 characters in the Courier font.To display a font that is not compatible with the Latin-1 locale, you must changethe font for the Flat File Wizard. For example, if you want to see Japanese fontsin the preview window of the Flat File Wizard on the Latin-1 machine, you mustchange the font to a Japanese font, such as MS Gothic.You can configure the font for the Flat File Wizard in the Designer.
If you configure the font and still encounter problems displaying text in thepreview window, complete the following tasks:
Reset the formats for the Designer.
Change the Designer formats back to thedefault settings. In the Designer, click Tools > Options > Format and click ResetAll to reset to default.
Ensure that the language of the data is installed on the machine.
If necessary, install the language. To install a language on a Windows machine,click Control Panel > Regional Options.
Importing Fixed-Width Flat Files
For information on importing delimited flat files, seeImporting Delimited FlatFiles.Fixed-width flat files are byte-oriented, which means that the field lengths aremeasured in bytes. They can also be line sequential, which means each rowends with a newline character. You can import a fixed-width file that does notcontain binary data or multibyte character data greater than two bytes per character.When you import a fixed-width file, you can create, move, or delete columnbreaks using the Flat File Wizard. Incorrect positioning of column breaks cancreate misalignment errors when you run a session with a file source containingsingle-byte and multibyte characters. Misalignment of multibyte data in a filecauses errors in a workflow.To import a fixed-width flat file definition:
Open the Source Analyzer and click Sources > Import from File.-or-Open the Target Designer and click Targets > Import from File.The Open Flat File dialog box appears.
Select the file you want to use.
Select a code page.When you import a flat file source definition, select a code page that matches thecode page of the data in the file.
Click OK.The contents of the file appear in the window at the bottom of the Flat FileWizard.
Edit the following settings:
Fixed-WidthFlatFileWizard,Step 1of 3DescriptionFlat FileTypeFile type. Select Fixed Width for a fixed-width file.Enter aNamefor ThisName of the source. This is the name of the source in the repository.You can use the file name or any other logical name.

Activity (15)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
tbalav liked this
rohit01234567890 liked this
sdshetti liked this
natrajdreams liked this
kamran liked this
kamran liked this
anithagarapati liked this
scribd_use liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->