Dynamic Transformation To Upload Flat Files Into Database

Feb 6, 2007

Hi,

My scenario:

I have 4 different flat files types each having different no. of column, order of columns etc. I want to upload all the 4 types into the same destination table in the SQL database. Before uploading I need to apply transformation to each column in the flat files. The transformations could be like

1) Multipying the source column by 100

2) Put an if condition for 2 source columns and then select one column to be copied into the destination.

I have the flat files schema with me and also all the transformations that are required.

Question:

Can SSIS provide me with a component that can read the flat file schema and the transformations from the database and apply them to the source data and then upload it to the constant destination table? Can derived column transformation be provided with the input columns list and the transformation to be done on each dynamically?

Why I want this way?

In future there can be an addition of extra flat file formats and we want to keep the changes to the SSIS packages to he mininum. Just entereing the addiional schema and transformation details in the database should run the package on the new flat file successfully.

Thanks for your time.

Regards,

$wapnil

View 15 Replies


ADVERTISEMENT

How To Load Dynamic Multiple Flat Files

Apr 23, 2008



Hi Evry one,

I Have Multiple Flat Files in Source Folder(They have Naming Conventions With Todays Date ex: Flatfile_20082204_1,Flatfile_20082204_2,Flatfile_20082204_3 ),
I need to Extract Each and Evry file by Dynamically, and Transform the Flat File then load that Flat file into the Destination Folder with Standard Prefix and Todays Date with a Sequence No ex:Flatfile_20082304_A,Flatfile_20082304_B, Flatfile_20082304_C


Please HELP Me
Thanks In Advance.

View 20 Replies View Related

How To Load SSAS Cube Partitions With Dynamic Name Directly From Flat Files

Feb 1, 2008

HI,

As the source data of the cube is from MySQL, and the source data volume is more than 80M row per month, I have to build multiple partition in the cube, each partition contain only one month data, even though, the time to load data directly from MySQL is still too long, and because the mysql .Net provider and is not mature enough, the connection often break while loading, so I have to try to load from flat file which was exported from MySQL.
The Partition Processing Destination seems support this way, but, even it shows the partition name in component editor, it actually process the partition with partition ID, and there's not any way to change destination partition name for this component.
Unless I have to change the SSIS package every month, looks like it is impossible to make a smart ETL program that can dynamic create new partition with the ID and name as YYYYMM every month and load data directly from the flat csv file exported from big MySQL table.


Does anyone know how to load data from flat text, and also support dynamic destination partition name?

And I also find a bug in Partition Processing Destination, even 2005 SP2, if there's more than one cube in a SSAS database, and if two partition name in different cube is same, in component Editor, you can not set mapping to the second one with the same name, even you point to the second one, and click ok, the next time you open the editor, you will find it high light at the first one. And even it shows name in editor, it actually process with partition ID instead of partition name, this make it is not possible by change the partition name which need to process to a constant name, say currentMonth to force the component process it.

Thanks.

Jun

View 4 Replies View Related

How Can I Upload The Files(any Kinda) Onto The Database???

Apr 15, 2005

Hi everyone,
I am developing an web-database application using ASP.NET, C# and sql server 2000 .
In the application i want to upload different scanned files (pdf,doc,excel,jpeg,ttf,etc) onto the database.. how can i carry out this task :-?
If any one got the solution.. then, please let me know...
thanks in advance
 

View 7 Replies View Related

Loading Large Flat Files Into A SQL Database Using DTS

Dec 7, 2000

Here's my delema, I have a file that's 308 bytes wide by 5.7 million records. The record length is fixed and the position and width of the known within the record. When I run DTS I recieve this error Msg MS DTS flat file provide and Err Diesdription: error creating file mapping view: not enough storage is available to process this command. Then when I try to continue with the wizard, it will not allow me to separate the data into the format that I need. Is there any other way to import this file using DTS?

View 1 Replies View Related

Flat File To DB Upload Approach Question

Mar 2, 2007

Hi guys,

Suppose I have a flat file that had columns that went like this:

rackId, cdname1, artist1, year1, cdname2, artist2, year2, cdname3, year3, artist3,...cdnameN, yearN, artistN

And I want to map it to a table that has the ff columns:

rack_id | CDName | Year | Artist

Assuming that N is constant and all rows of the flat file will have N or less values filled up per rack, how do I map the fields from the flat file such that cdname1, cdname2 and cdname3 all fall under the CDName column, year1 and so on will fall under the Year column, and artist1 and so on will fall under the Artist column?

View 3 Replies View Related

Deploying Web App, Which SQL Files Do I Upload?..

Nov 24, 2004

I'm working on a web application that uses SQL Server 2000. Once I'm ready to upload my website to a production server, I need to know how to upload my SQL Server database files to the server. Are there actual files that can be uploaded? I've only deployed a website that works with MySQL to a production server, and there were no files to upload... the database had to be created on the server, and then the data itself had to be exported to text files (on my computer), then imported/uploaded to the production server using SQL statements...

How do I do this?

Thanks~

View 2 Replies View Related

Bulk Upload Files

Jun 22, 2008

i have tried to move upload of files from SQL2000 to SQl2005.
in SQL2005 i have created a JOB in which has 2 steps,each one of them activates the same batch files i used in SQL2000 (where i have change the server name and so on),for example :

for %%f in ( %BULK_UPLOAD_BASE%Temp%1*.txt) do bcp "db1.dbo.Test_TargetTable" in %%f -S SERVER-REP -U n145 -h "TABLOCK" -e %BULK_UPLOAD_BASE%ErrorErr10.txt -o %BULK_UPLOAD_BASE%LogsOutput10.txt -P n145 -C RAW -f %BULK_UPLOAD_BASE%format_with_RawData_4test.fmt


when irun this code in a bat file, the data is loaded with no problem.
when i run the JOB i see in the LOG that everything was ok, but actually the data fromthe files was not loaded - any idea why?
thnaks in advance
peleg


Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

View 1 Replies View Related

Need To Remove Certain Rows From The Flat File Before Transformation

Jun 4, 2007

hi

I have a flat file as below

Date 20070606

Empid Salary X1 x2 x3 x4 x5

100 10000 .............................





where 10000 is the salary got on date 20070606 by empid 100

.x1,x2,x3...are the remaining columns in the file.I need to extract the date and also continue reading the remaining data.How can i do this???



Any help?



thanks

ami

View 1 Replies View Related

Upload Files And Downloading A Pdf File

Mar 5, 2008

what data type am i going to put to my uploadedFiles column in my database... uploaded files are in document format or .txt
 also.. how can i make those files converted into pdf files.. also enable users to download it..
tnx!!!
forums.asp.net = "great help"

View 7 Replies View Related

Upload Files To Image Column

Nov 6, 2006

Anyone have any luck using "Upload multiple files to SQL Server Image column"
www.databasejournal.com/features/mssql/article.php/3444771

View 3 Replies View Related

Upload Text Files Thru DTS/SSIS

Jan 31, 2007

I have created a DTS package which imports text file into single sql server table with 8 columns (SourceData). The DTS package uses 'Test1.txt' file. Now i have around 200 text files (Test1,Test2,.....Test200). I need to import them one by one into 'SourceData' table. Could you pls. help me out in getting solved.

Thanks,

Hemal

View 4 Replies View Related

Browsing For Files (Images) To Upload To Server

Jun 9, 2007

 How do i Browser for files in computer, and upload them to Server? then link the file's URL(on server) into a Database.What i am wanting to do: Upload pictures (For products) for use in product pages What i think i need: Browse for images on local computerUpload the file to ServerStore the Image URL(relative to server) in DB

View 13 Replies View Related

Using FTP Connection Manager In SSIS To Upload Files

May 12, 2015

I am using FTP Connection manager in SSIS to upload files. Does it close session after it completes the task?

View 2 Replies View Related

T-SQL (SS2K8) :: How To Write A Procedure To Upload XML Files Into Above Tables

Jul 15, 2014

There are two tables in my database HotelList_Temp, AsiaHotelChildrenAges_Temp

I need to write a procedure to upload the xml files into above tables .xmlfile is in my pc

xml to table column mapping are given below

<HOTEL>
<SEQNO>1</SEQNO>
<GRADE>5</GRADE> --StarRating
<PRODUCT>H</PRODUCT>
<CITYAREA>CKOWM</CITYAREA> --CityLocation
<CITY>HKG</CITY> --ResortCode
<CITYAREANAME>Mong Kok </CITYAREANAME> --ResortName

[code]....

View 9 Replies View Related

Dynamic Transformation Mapping In DTS

May 11, 2006

Hi,

I need to export data from SQL tables to AS400 files(the SQL table has the
same file name and column names as the file on the AS400) .
I created a DTS that has the following tasks: dynamic properties task, SQL
server connection, transform data task and a other connection(ODBC data
source).
I'm using global variables to dynamically set the source and destination
tables names on the transform data task. The problem is the transformations
are not automatically mapped and I get an error message when the
DTS package is executed with a source and destination that has
different columns than the ones specified in the transformation.

Any ideas or possible workaround would be greatly appreciated.
Thank you very much.

View 4 Replies View Related

SQL Server 2008 :: Upload 1000 Text Files Into One Table - Skip Last Row?

Jul 19, 2015

Im trying to upload 1000 txt files into one table in SQL. I'm using the following query, to upload one txt file at a time:

bulk insert [dbo].AAA_2013_2015
from 'dataserverSQL Data FilesSQL_EMELIZFC x Bloque Detallada201308 Detalle FacturasFACT_BLOQ_AGO13 (4).txt'
with (firstrow = 2,
lastrow = ???,
fieldterminator = ';',
rowterminator = '0x0A')

I'm trying that the query skip the last row because gives me the following error:

Msg 4866, Level 16, State 1, Line 1
The bulk load failed. The column is too long in the data file for row 1, column 17. Verify that the field terminator and row terminator are specified correctly.
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".

know a command to skip the last row, something like lastrow= all-1...or something like that.

I also executed using MAXERRORS command...like this:

bulk insert [dbo].AAA_2013_2015
from 'dataserverSQL Data FilesSQL_EMELIZFC x Bloque Detallada201308 Detalle FacturasFACT_BLOQ_AGO13 (15).txt'
with (firstrow = 2,
fieldterminator = ';',
MAXERRORS = max_errors,
rowterminator = '0x0A')

does not recognize MAXERRORS command, also tried to put a number of error instead of max_errors.

View 0 Replies View Related

Integration Services :: Dynamic Query For Lookup Transformation

Nov 3, 2015

In my package I am using lookup to get new and similar record. I want to filter the rows for Lookup Reference Data Set by using Variable Value.

I have created variable @[User::CustId] with Int32 datatype, having default value 2 when I am trying to evaluate below query I am getting error 

"select CustId,PartNm,LocId,LocTyp from loc where CustId= "+ @[User::CustId] 

Error. The Data types "DT_WSTR" and "DT_I4" are incompatible for binary operator "+".

The operand types could not be implicitly cast into compatible types for the operation. To perform this operation , one or both operands need to be explicitly cast with the operator.

View 2 Replies View Related

Sort Transformation Makes A Lot Of Temp Files

May 29, 2007

Hi all,



I have a problem with a Sort Transformation, I have a CSV file with 200'000 rows the csv file is about 30Mb. When the rows are processed in the Sort Transformation, SSIS generates around 160 temp files of about 10Mb each.



How can avoid so many temp files to be generated ?

View 4 Replies View Related

Dynamic Flat File Creation!

May 14, 2008

I'm trying to read the folder which has flat files and transform it and put it another folder with the SAME original name.
I created a For Eachloop containter and assign it to variable infile. In the data flow I added some transform and flat file destination. currently its reading 3 files and output is only one file.
I would like to create dynamic flat file connection so that it'll create separate files (same name) in different folder.
Thanks,

View 5 Replies View Related

Dynamic Flat File Destination Name!

May 4, 2007

Hi,

I am trying to access from OLE DB source. And based on one of the columns, I need to write the data to a Flat File Destination.

For Example,

CustID, ProductID, Product Name, Product Description

Say I am going to write to a different Flat File for every product. So if there are 10 products in the data. There should be 10 Flat Files. Also the file name should include the Product Name And Product ID.

It is being done in a single Data Flow Task.

Right now the Property Expression for the File Name is which is not working)




Code Snippet@DestFolder + [Data Conversion].ProductID + @TodaysDate + ".txt"





The ProductIDs are in the ascending order. Any help or guidance?

Thanks

-Leo







View 7 Replies View Related

Dynamic Flat File Creation

Mar 19, 2008



Hi All,


I'm new to SSIS. I have a small problem. In our system we are trying to create flat files based on data from returned from different SQL stored procedures. The configuration settings for creating the flat files are stored in a SQL table.

For example, the config table will look like below :

Feed Id Feed Name Feed File Name Feed Stored Procedure Name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 Biz C:Biz.txt dvx_GetBiz
2 PG C:PG.csv dvx_GetPG
3 NexT C:NexT.txt dvx_GetNexT
4 Amez C:Amez.csv dvx_GetAmez

The problem is dvx_GetBiz, dvx_GetPG,... all have different number and types of columns. So, I'm not able to create a dynamic Flat File destination depending on the columns returned from the corresponding stored procedure.

Is there a way to accomplish this ?

Pl. help.

Awaiting someones reply ASAP.

Thanks & Regards,
Vidya.




View 4 Replies View Related

Dynamic Selection Of Flat File

Oct 6, 2006

I am writing a package where the user uploads a flat file to a web folder. I need to automate this package to run everytime it sees a new file.

How can I implement this?

Can I make a call to a package or a sql server job to run from .net 2.0?

Do I need to use a service broker to look for a new file and run the package or a stored proc....I am looking for an async process where user doesnt have to wait for the package to run as it involves data validation of flat file and its huge...

Please help!!

View 2 Replies View Related

Dynamic Name For Flat File Destination - WEEK NO

Apr 17, 2008

Anyone knows how to give the name of a flat file specifying today's week number??

filename_ww
for today it should be filename_16 (since week number is 16)

View 1 Replies View Related

Merging, And Loading Dynamic Flat File.

Mar 14, 2007

I have number of csv files in a folder, all of them with same columns, need to be merged into one table and imported to sql server.

-The first row of the csv file is a header.
-The csv files are updated everyday
-The destination table is replace by new table with new info in the csv.
-The new csv files can be created and old csv files may no longer exist, but we are only interested in information contain in current csv files in the folder.
-I need SSIS to combine all the csv files in the folder and merge into one table.
-Other issue is that the field names may change in csv, so can the SSIS package recognize the change in field name and made necessary change in destination table as well.

Any insight on this issues will be greatly appreciated?

View 1 Replies View Related

Dynamic Columns For Flat File Destination?

Jul 10, 2006

I have a database app, and we're implementing various data export features using SSIS.

Basically, it's a couple of straight extracts of various recordsets/views, etc. to CSV (flat files) from our SQL Server 2005 database, so I'm creating an SSIS package for each of these datasets.

So far, so good, but my problem comes here: My requirements call for users to select from a list of available columns the fields that they want to include in their exported file. Then, the package should run, but only output the columns specified by the user.

Does anyone have any idea as to the best way to accomplish this? To recap, at design time, I know which columns the users will have to choose from, but at run time, they will specify the columns to export to the flat file.

Any help or guidance here is greatly appreciated

View 7 Replies View Related

Dynamic Destination Flat File Loading

Jan 4, 2006

Here's what I want to do -

Dynamically load a flat file from a dynamic source table-

The source table metadata is known via the SYSOBJECTS and SYSCOLUMNS tables- I can pull the column names, type and lengths from these tables based on the table name. (my goal is pretty simple- pull data from a table in our database, and save it down to a flat file)

Would this be enough to dynamically create the destination flat file?  If so, how do I do it?

Thanks

-rob

View 3 Replies View Related

DTS Large Flat Files

Dec 5, 2000

I have some Large flat fiiles that I need to export to my SQL Server database. The file sizes range from 16 MB to 116 MB. I've tried to save the files to an excel sread sheet and then export them in that format, but that didn't work. does anyone have any suggestions?

View 1 Replies View Related

Export To Flat Files

Apr 13, 2007

How can I export data from sql server 2005 table to fixed length flat file without using xp_cmdshell option from sql server stored procedure ?

View 7 Replies View Related

Import Flat Files

Feb 7, 2007

hi all



i using SSIS to import flat files and i need support



how can i import flat file from folder inculed many files and when finish start to next and next .....



if can i select from flat files to add condition

like Select * from.....where ......

thanks

View 5 Replies View Related

Need Help Importing Flat Files

Jan 24, 2008

Hello Everyone.

I am a bit new to SQL Server but not to DBA or programming per se. I am having difficulties getting either an Excel or Text flat file to import properly.

I guess it would be best to ask, using either SSIS or BULK INSERT, what options need to be entered for a typical excel flat file?

View 2 Replies View Related

How Do I Store Flat Files

Oct 18, 2006

In my application I am allowing the users attach files. I found the data type "Image", Will this also allow regular file attachments?

Thanks,

Steve C.

View 4 Replies View Related

Integration Services :: Flat File With Dynamic Columns

Aug 31, 2015

I will be receiving a CSV daily where columns within the file will change. The column order and number of columns can change daily. I need a way to read in the header from the csv and create a flat file connection that reflects the columns listed in the header.  

Is there an easy way to do this using a script task? I have already read the header into a table but I have been unable to create the dynamic file connection.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved