10-22-04 10:49 PM
Very high level description of the steps you need to do to achieve this:
1. Define a flat file schema that describes the format of your positional
file.
2. Create a SQL send port to your database table in the SQL server. You can
do this by using the "Add generated items" menu in solution explorer on
VS.NET (right-click on project, select "Add" -> "Add generated item" ->
"Add adapter" -> SQL).
3. Once you've done #2 there will be an XML schema added to your project.
This schema corresponds to the structure of the database table where you
want to write data to.
4. Now you need to create a map that transforms the flat file schema to the
schema generated by SQL adapter.
5. After that you need to create a receive pipeline with the flat file
disassembler in it and configure the disassembler to use the flat file
schema you defined in step #1.
6. Lastly you need to hook this all up together by creating recieve port,
receive location with your receive pipeline, and connecting the SQL send
port to that receive port by using filter expression on send port. Also you
need to place the map you created in the step #4 either in receive port or
send port.
--------------------
>From: maverick <maverick.1ecg98@mail.webservertalk.com>
>Subject: Split the flat file and fill SQL tables
>Date: Mon, 18 Oct 2004 14:26:36 -0500
>Message-ID: <maverick.1ecg98@mail.webservertalk.com>
>Organization: Web Servers forum
>User-Agent: www.webservertalk.com news gateway
>X-Newsreader: www.webservertalk.com news gateway
>X-Originating-IP: 167.211.190.2
>Newsgroups: microsoft.public.biztalk.general
>NNTP-Posting-Host: ev1s-66-98-192-98.ev1servers.net 66.98.192.98
>Lines: 1
>Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12
.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.general:20628
>X-Tomcat-NG: microsoft.public.biztalk.general
>
>
I have a flat file that is positional. There are certain characters
(i.e|, or #) etc at various positions. Now I need to split this file at
the position of these specific characters and on basis of the
"characters" present, I need to assign the whole record (till that
character)to a "specific" table in SQL server.
>
>What is the end-to-end solution for this?
--
maverick
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message437784.html
>
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
[ Post a follow-up to this message ]
|