Showing posts with label flat. Show all posts
Showing posts with label flat. Show all posts

Monday, March 19, 2012

HI

HI

I am new to sql server 2005. Just want to know how you perform this task.

I have to load my fact table from multiple flat files I am trying since last week when I connect multiple flat files to lookup it gives me error.

Any suggestions

Thanks

Don't you think it would help if you supplied the error message?

Do you honestly expect anyone to be able to help you based on the information you've provided here?

-Jamie

|||As Jamie pointed out, a bit more detail would help.

You trying to load multiple flat files into your fact table. What are you doing with the lookup? Where is the error happening?
What is the error message.

Ever taken your car to a mechanic and said it makes a funny noise. Did he look at you oddly?|||

Hi

I am really sorry I didnt provided the complete information. What I am doing is that connecting multiple flat files to lookup so that I can load my fact table. When I connect the second flat file it gives me error saying that

"cannot create connector The destination component doesnt have any avaliable inputs for use in creating a path"

Thanks

|||

adnan wali wrote:

Hi

I am really sorry I didnt provided the complete information. What I am doing is that connecting multiple flat files to lookup so that I can load my fact table. When I connect the second flat file it gives me error saying that

"cannot create connector The destination component doesnt have any avaliable inputs for use in creating a path"

Thanks

OK.

The lookup component can only take one input. If you want to pass the contents of many files to it then you will need a Union All component. Pass the output from all of your files to the Union All and then pass the output of the Union All to the Lookup.

Good luck.

-Jamie

Friday, March 9, 2012

HELP--SSIS Dataflow Task

Need help regarding ssis dataflow task

I need to create a ssis package. I want to import the data from a flat file to a table.

Lets say, the table has 5 columns -- col1, col2, col3, col4 , col5.(Assume that all columns can be NULLABLE) The datafile contains the data related to only three columns say col1, col2, col3. So when I use dataflow task to import the data from the file to the table, I will only get three columns, col1, col2, col3. Columns col4, col5 will be NULL.
However, I want to populate columns col4, col5 with some values which are stored in the variable.

IS there any way to do this?

Any help would be appreciated.

Thanks

vjai wrote:

Need help regarding ssis dataflow task

I need to create a ssis package. I want to import the data from a flat file to a table.

Lets say, the table has 5 columns -- col1, col2, col3, col4 , col5.(Assume that all columns can be NULLABLE) The datafile contains the data related to only three columns say col1, col2, col3. So when I use dataflow task to import the data from the file to the table, I will only get three columns, col1, col2, col3. Columns col4, col5 will be NULL.
However, I want to populate columns col4, col5 with some values which are stored in the variable.

IS there any way to do this?

Any help would be appreciated.

Thanks

What variable?

-Jamie

|||

Nullable flat file columns is a bit of a strange one, how do you tell the difference between null and an empty string? Having no column is not a valid way to represent null, that is an invalid file format! I suspect what you are asking cannot be done, certainly not if the format of the file changes.

if the format is static, but sometimes values are empty then you could use a Derived Column transform to test for this and substitute a variable value in place.

|||

hi Vijai

You can do this!! and its very simple

Steps

I assume that u have a source with 3 cols.

Now add a drived column transformation task create two new columns and in expression give corresponding variable .

Now if ur output will have 5 columns, 3 from ur source and 2 new columns having values from the variables.Do the necessary mapping with destination.

Thanks and Regards

Rahul Kumar, Software Engineer, India

help--backup tables using BCP

I need to backup data (which satisfies a condition) from tables to flat files.....it worked fine using bcp...now i need to delete the records from tables which have been backed up......is ther any way out?

i wrote that bcp commands in a batch file to automate it.....

Using SSIS, you can write a package to export the table to a text file using a dataflow, and use an Execute SQL task to delete the rows afterward.

If you don't want to use SSIS, you might want to post to the T-SQL or Tools forum.

help--backup tables using BCP

I need to backup data (which satisfies a condition) from tables to flat files.....it worked fine using bcp...now i need to delete the records from tables which have been backed up......is ther any way out?

i wrote that bcp commands in a batch file to automate it.....

Using SSIS, you can write a package to export the table to a text file using a dataflow, and use an Execute SQL task to delete the rows afterward.

If you don't want to use SSIS, you might want to post to the T-SQL or Tools forum.