Converting .txt files to sql..problems..

More
9 years 6 months ago #10023 by ABJ
Hi Mike
Trying the forum now..hope it works :)

Im trying to convert a txt file to sql.
Let me decribe the prosess :
Step 1:Downloading a txt file via FTP to a local drive.
Step 2:Convert the file to SQL.
Step 3:Copy the file to another FTP location.
Step 4:Delete the file from the local drive.

The 2 problems is when i try to read the file.
1: Using odbc, works fine when i try it out with a file in the local drive. It reads the file fine.
But, when theres no file in the dir, and i start the package, it copys file correct, goes to the "read file"
but then says theres no file in the dir.. it is either a missing delay or it will not allow me to read *.txt

2: using read from text (not ODBC), not working at all, could not read the txt.
Some of the txt file is attached

The 3. problem is that the numbers in the file is in float, eg. 5.3600254E+1.
The reader reads . as a 1000 seperator, not as decimal. Is it possible to change it in ETl or is on the server basis (global
region setting).
I can not do this, since my SQL server handles more DB´s and i would prefer not to mees with it..

Does it make any sense ?

Best regards
Anders B. Jensen, Spica Tech
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #10024 by admin
when you say

Step 2:Convert the file to SQL.

Are you loading the file into MS Sql server?


Mike

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #10025 by ABJ
Maybe :)
Reader -> Validator -> Transformer -> Writer.
I have a SQL DB the writer is connected to via ODBC..works fine

/Anders

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #10026 by admin
The 3. problem is that the numbers in the file is in float, eg. 5.3600254E+1.

So the main problem that you are not able to load 5.3600254E+1 value into the database?

Mike

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #10028 by ABJ
Yes and no, they will figure as 53600245E+8 or something like it

/Anders

Please Log in or Create an account to join the conversation.

More
9 years 6 months ago #10029 by ABJ
BTW, we can change the *.txt file format if needed, e.g. with a "header here";"another here"; etc..

/Anders

Please Log in or Create an account to join the conversation.