Flate file containing comma error
Hi Experts,
I have got an excel file from user which I have converted into csv. The problem is that some of the fields in the record contains ',' (comma) which is causing the load to fail. (I suppose its moving everything after comma to next field which is not right since that is part of that field too).
How can i resolve this issue.
Hi,
Just repeat the steps
Step1
Create a new infopackage>client workstation, File Is (Datafile)-Select CSV File
and Browse the CSV file
Step2
in the Dataseperator type , (uncheck HEX)
Step3
Escape Sign type ; (uncheck HEX)
Step4
Character used for Decimal point type .
Step5
Replcmt Char type #
Step6
Go for a Preview closing the CSV file
Step7
Try to alter the csv file and just inclued one record
Step8
Processing type , select one Only PSA
Let me know if you get the preview correct now ..
if soo load till PSA and check the data
and do let me know
Santosh
Similar Messages
-
hi
I'm trying to use foreachloop container in order to read the data that i have in several txt files and upload it into MRR table.
when i'm trying to run the package, i'm getting the following error:
[Flat File Source [2]] Warning: The system cannot find the file specified.
[Flat File Source [2]] Error: Cannot open the datafile "VendorPurchases20050512.txt".
[SSIS.Pipeline] Error: Flat File Source failed the pre-execute phase and returned error code 0xC020200E.
I don't know what's the problem since it was working before.In the flat file connection manager i defined all the path including the name of the file.
I'll be happy for assistance
thanks
YaronHi Yaron,
Does the file stored in local file system or a share folder on remote server? If you can load data from a file in local computer, but cannot load data from a file in a remote computer, the issue may be caused by the Kerberos authentication. In this condition,
check the following points:
Enable SQL Server for Kerberos
Check delegation settings for SQL Server service account and Computer
Add Host SPNs for FileShare Server and SQL Server
References:
http://msdn.microsoft.com/en-us/library/dd568720.aspx
http://msdn.microsoft.com/en-us/library/ms191153.aspx
Regards,
Mike Yin
TechNet Community Support -
I am using SSIS to extract fixed width data into a flat file destination and I keep getting below error. I have tried almost everything in this forum but still no solution. can anyone help me out to solve this problem.
[Flat File Destination [220]] Error: Failed to write out column name for column "Column 2".
[SSIS.Pipeline] Error: component "Flat File Destination" (220) failed the pre-execute phase and returned error code 0xC0202095
ThanksHi Giss68,
Could you check the Advanced tab of the Flat File Connection Manager to see whether the InputColumnWidth and the OutputColumnWidth properties of the Column2 has the same value? Please refer to the following link about the same topic:
http://stackoverflow.com/questions/10292091/how-do-i-fix-failed-to-write-error-while-exporting-data-to-ragged-right-flat-fil
If it doesn’t work, please post the sample data and the advanced settings of Column2 for further analysis.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
[SOLVED] Generated grub file contains syntax error
I haven't touched any of /etc/default/grub and /etc/grub.d/*
Here's generated file containing syntax errors:
http://pastebin.kde.org/p39g742cg/kn73gf
Last edited by dlh (2013-12-09 18:59:57)Well the errors show up when:
grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-ck
Found initrd image: /boot/initramfs-linux-ck.img
Found Windows 8 (loader) on /dev/sda1
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 159
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.done -
How to load flat file containing data(separated by commas) into cube sapbi.
hi gurus,
please help me with this question?
i have some data in the flat file for example, address but with commas for ex:
h.no:123,colony,area,hyd-59.now i have even other columns in this flat file like customer name,age.....i want to know ,how to load this data into infocube. where in when it comes to address column sap bi takes it as a single column in the generated report.Hi Amulya,
To get reports on all ur records save ur flat file in .CSV format -> to do this open ur flat file, save as "filename.csv".
-> CSV is nothing but comma seperator value, sap supports two types of formats 1).csv and 2) ASCII format.
we prefer .csv format.
check this link for step by step modelling.
http://www.scribd.com/doc/3804698/SAP-BW-StepBystep-From-Fu-Fu
http://books.google.co.in/books?id=3wBjrMDWescC&pg=PA184&lpg=PA184&dq=stepbystepdocumentationfor+sap-bw&source=bl&ots=RIp
T1knFet&sig=_4HOg59Om504Zb9RObF9Ir_oE64&hl=en&sa=X&oi=book_result&resnum=3&ct=result#PPP1,M1
hope it helps u,
Thanks,
Sai Chand.
Edited by: sai chand on Jan 26, 2009 10:04 PM -
Loading Pipe delmiter flat file with ',' (comma)
Hi Guys,
I have a field which contains ',' as its value. The value is 0315A Mgr, Cust Service for a infoobject called ZJOB_TIT.
Also, I have wrote the following code in field routine since previously this field was throwing hexadecimal errors and the load is through flat file.
DATA: v_gpurqtrnr TYPE /BIC/OIZJOB_TIT.
MOVE SOURCE_FIELDS-/BIC/ZJOB_TIT TO v_gpurqtrnr.
TRANSLATE v_gpurqtrnr TO UPPER CASE.
IF v_gpurqtrnr CN
',<>?/{}[]\|;:"''ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+=123456789~` .'
RESULT = space.
ELSE.
RESULT = v_gpurqtrnr.
ENDIF.
After loading the data, in preview of PSA - everything looks fine. Field ZJOB_TIT shows to have the value 0315A Mgr, Cust Service. But when I load to the cube - I get blank for the same field.
I am not sure what more i can do to eradicate this problem.Hi
PSA is the data before under going your tranformation or field routine. so you are able to see the data in that field . Now as per the code which you have written above it will surely be deleting all the characteristics which you have given under '.......' . Modify your code to eliminate only the comma and not the alpha numberic values.
Rajesh -
Hi All,
I am loading data from flat file. It is given error .File is avilable in selected directory and not opend but it showing return code 01.
That error message is like this.
Diagnosis
An error occurred in the source system.
System Response
Caller 09 contains an error message.
Further analysis:
The error occurred in Extractor .
Refer to the error message.
Procedure
How you remove the error depends on the error message.
Note
If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.Hi,
While loading data from a flatfile, it is always better to first check the 'Preview' which is basically simulating the dataload from the file to check if the format is correct. You can do this by clicking on the 'Preview' button in the External Data tab within the infopackage. When you click on the 'Preview' button, it asks you for the number of header rows to be ignored and the number of records you want check from the file. If there is an issue with a particular field or the file, it will give an error message. You can correct the same and them do the actual dataload.
Commom errors during dataload from a file are:
1. You keep the file open and try to load the data. Please close the file before you start the dataload.
2. Data seperator and the number of header rows not specified correctly. Kindly double check.
3. Sequence of fields in the file and the infosource do not match .
Check the above points and see if it is useful.
Regards,
Shilpa -
Dear all,
We are using BI7.00 and in one of our data load, which is running automatically, the flat file will be generated in the common location and then load takes place automatically based on event.
My problem is in one of our file, the field named "customer location" has a long address seperated with commas like for example "Chakan-Talegaon,Mahaalunge,CHAKAN,P," -> this value should be accomadated in one field only but since the seperator is "," system assumes it as seperate field and pushes the other value to the next field. The next field is a qty field and hence when this character is moved to the qty field , data load fails due to mismatch.
My requirement is since it is automatic generation of the file and load is also automatically carried out, manual change to the file cannot be carried out.Is there any way of making system understand that for this particular field if the value is with commas seperated between values, system should not consider it as seperate field value.
Expert suggestion required.
Regards,
M.MThank you all for the reply.
Dear Godhuli,
Thank you for your reply. I tried the same as per your information, i.e., the data seperator as "^" and the escape sign as " . Sorry this doesn't work for me , in the sence , the data load takes place without error but in the PSA all the fields are without values.
I could not percieve the correction method that has to be adopted to solve my problem. Experts solution is expected.
Kindly provide help to solve my problem.
Regards,
M.M
Edited by: Magesh Magesh on Apr 27, 2009 6:35 AM -
Multiple flat files with Comma delimiter and Pipe Delimiter in the sub folders.
Hi,
I have a directory C:\doc\Outcomes\Health --(This is the main path).
In the path above i have multiple subfolders like
A
B
C
D
Folder A & B have 20 flat files each which are comma separated and pipe delimiter files.
Folder C&D have 20 excel files each.
1) So, In SSIS while looping through the subfolders how do i limit to loop only excel files one time and flat files one time.
2) In folder A&B, how do i loop only Pipe delimiter files (neglecting comma saperated files). I want to loop only pipe delimiter files while using for each loop container.
ThanksBoth are txt files, but the data inside the files is saperated by ',' and '|'. ( comma and pipe)
Thats ok
If delimiters are not consistent you can use this method
http://visakhm.blogspot.in/2014/07/ssis-tips-handling-inconsistent-text.html
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Hierarchy from flat file loading with errors - duplicate node names
Hello experts,
I am loading a product hierarchy from a flat file into a custom hierarchy
object. The issue is that it errors out saying I am loading
duplicates within nodes, however all node IDs within a level are unique.
It seems to be looking at the node name to determine uniqueness and I know
we have some duplication within the text there especially when you factor
in the 32 character limitation for the node name. Does anyone have an idea
as to whether it is possible to have it only consider the node ID instead
of the node name to determine uniqueness?
A colleague suggested using the link ID to fix this problem but I don't know how that field works or how to populate it.
I'm working in a BI 7.0 environment (I don't know if that makes a difference since you still have to use the 3.x objects to extract the hierarchy).
Any help would be appreciated.
NancyHi Nancy,
You may wish to check this OSS Note 1026749 - Hierarchies: Consistency check for duplicate nodes and 912115 (old one)
Symptom -
When you load or activate a hierarchy it terminates with error message RH 109 or RH 211. The hierarchy contains duplicate nodes and this is not allowed. The long texts of messages RH 109 or RH 211 do not describe the reason for the problem sufficiently or they are partially incorrect.
There is uncertainty about in which cases duplicate nodes exist in a hierarchy and in which cases duplicate nodes are allowed.
Hope this helps,
Bye...
Naga Timmaraju -
Using DTS Wizard to Import a Flat File containing data like "4124, rue Champenois"
THE BELOW DATA SHOULD BE ONE FIELD, but the COMMA causes it to separate into two fields. The FLAT FILE is a comma-delimited CSV file. The data in the CSV file for this one field actually uses double quotes at each end of the street number and street name.
"2144, rue Champenois"
"340, rue Champs Elysees"
What happens during the conversion process when using the DTS Wizard is that the street number and street name are split apart into two separate fields. This messes up the output and causes the SSIS package to fail, so that the FLAT FILE Source's data never
makes it into a SQL Server Database Table. I saw a box called TEXT QUALIFIER, so I put the DOUBLE QUOTE in there, thinking that this would keep the one field together which contains the STREET NUMBER and STREET NAME. No, that didn't work.
When using this import wizard with a FLAT FILE SOURCE, how do you keep a string that has double quotes at each end and a comma in the middle, together as one field?
Now, I went back later and started all over and put the " (Double Quote one time) in thr TEXT QUALIFIER block, and this did work. Why sometimes and not others?Hi Champenois,
I have tried your problem.
1) Exported "DimCustomer" table in "AdventureWorksDW" to filat file with bellow query.
Query: select top 10 CustomerKey,AddressLine1 from DimCustomer where AddressLine1 like '%,%'
2) Data comes to flat file like this.
3) Then i have taken flat file source and configured like this.
4) Now went to "Columns" tab and check the data. I am getting only two columns like above.
So, Please check your flat file connection manager with above flat file connection screen shot.
Please make this as answer if, you are able to solve your problem. -
File content conversion - flat file to Idoc error
Dear Experts,
I have a situation where im using FCC in the sender adapter The data is in flat file with multiple fields separated by space .
(*header444456 line4445758 header343434 line445687*) sample falt file data . should be divided as below
header - 44456 , 343434
*line - 44457578 , 445687
So i want to read the header items and pass it into header data of the IDoc and line items into line item data of the Idoc . And the header items and fields items are mixed up in the flat file . How do i read from the position 20 to 26 , 37 to 56 intermittently .And im not using any key field name . as the whole data is in one line . Any solution would be of great help .
Thanks in advance
Ganga
Edited by: N.Ganga on Jan 28, 2012 3:30 PM
Edited by: N.Ganga on Jan 28, 2012 3:30 PMDear Grzegorz ,
Yes i totally agree with you it can be separated by comma . But it is as below
Header - (once ).............................................. Flat file example :
Field 1 -
>order line no 1 plant material 1 code 1 quantity 1
.......................................................................order line no 2 plant material 2 code 2 quantity 2
Field 2 (plant vlaue shuld come........................................................|
Line - repeats (0-unbounded) | | |
field 1 (line no 1)----
| | |
field 2(material1)----
| |
field 3 (quant 1)----
|
field 1 (line no 2)----
| | |
field 2(material2)----
| |
field 3 (quant 2)----
|
So i need to read the data intermittently and map them in the line items ignoring the order and plant data in every line apart from the first line. The order and plant remains the same in the flat file only line items keep changing .
Hope my question is clear .
Regards
Ganga -
Hi Guys,
I am trying to create a datasource from a flat file (excel data in csv format) and when I create infopackage on the datasource and trying to load, I am getting the error,
Error 'An exception with the type CX_SY_CONVERSION_NO_NUM' at conversion exit RSDS_CONVERT_NUMBER (field FAB record 480, value 8)
Can somebody help me with this.
I am working in BI 7. In the excel sheet I have all cell with general format.
I tried using PSA Typed and not Typed. Didnt work
Thanks in advanceI selected Data Format as "Separated with Separated (for Example CSV),
Data Separator ,
Escape Sign ; (this i didnt understand where it comes in csv file) also I left the Hex check boxes unchecked.
PSA not Typed is also unchecked.
Am I missing something? Data types in excel spreadsheet (csv file)?
Thank you -
Hello,
I am trying to load a flat file into a datasource. When I execute the infopackage, i am getting a lot of errors for diff fields in the datasource like this:
Error 'An exception with the type CX_SY_CONVERSION_NO_NUM' at conversion exit RSDS_CONVERT_NUMBER (field DATE_OF_BIRTH record 1, value 12/)
What does this mean and what do I have to do to load the data properly into the PSA?
Thanks.Hi,
This may be due to following,
1. I guess you are using some Date data in your file. First check whether in your Datasource u have defined that field with correct data type( either Calday, calmonth...).
2. If you have declared correctly, check whther you are giving the data for Date in your file in correct format: Ex: 012007, 022008....
3. Check the sequence of the fields in your file and datasource, whether its correct or not.
rgrds,
v.sen -
Flat files data comma separated using SSIS.
Hi,
I have multiple flat files which come in comma separated columns. See example below :
Customer Data
CustID,FName,LName,Disease,Email,Phone
12345,Xyz,Smit,Bronchitis, Asthma and fever,[email protected],80000000
12346,Abc,Doe,fever Headache,[email protected],90000000
12347,Klu,joe,Sugar, cough and fever,[email protected],12345678
Please look at the ID's 12345 and 12347. The disease column has a internal comma space between. How do i remove the comma spaces in the disease column, so that it can be loaded from flat file to sql table using SSIS. ?
Please help !
ThanksHere is a full solution base on my post above (first option)
1. create temp table (Give it a unique name):
create table #T (Txt NVARCHAR(MAX))
GO
2. Insert all the data into temporary table. Each line in the text file, is a value for one column in a row in the table.
-- I will jump to the table and use simple insert.
-- If you have problem with step 1 then please inform us (this is simple bulk insert basically)
insert #T (Txt) values
('1234435,Xyz,Stemit,Brfsdonchitis, Asthma and fever,[email protected],80000000'),
('12346,Agjdfjbc,Doge,fevhhhher Headsxdshhache,[email protected],90000000'),
('123447,Klu,joe,Sugar, cough and fever,[email protected],12345678')
GO
the result should be like this:
Txt
1234435,Xyz,Stemit,Brfsdonchitis, Asthma and fever,[email protected],80000000
12346,Agjdfjbc,Doge,fevhhhher Headsxdshhache,[email protected],90000000
123447,Klu,joe,Sugar, cough and fever,[email protected],12345678
I use a SPLIT Function named Split_CLR_Fn. This is a CLR Split function that get input <string to split> and <string as delimiter,> and it return table with 2 columns ID, SplitData
For example if you use: SELECT * from Split_CLR_Fn('text1,text2,text3,',') then you get result:
ID SplitData
1 Text1
2 Text2
3 Text3
** You can find in the internet several good functions, I HIGHLY RECOMMENDED NOT TO USE T-SQL FUNCTIONS but CLR FUNCTION. Check thi link to understand why:
http://sqlperformance.com/2012/07/t-sql-queries/split-strings
** This is the best function that I know about and I use it, but I change the code a bit to return 2 columns and not just the SplitData as in this blog: http://sqlblog.com/blogs/adam_machanic/archive/2009/04/28/sqlclr-string-splitting-part-2-even-faster-even-more-scalable.aspx
That's it :-) we are ready for the solution which is very simple
Solution 1 (BAD solution but easy to write):
select
(select SplitData from Split_CLR_Fn(Txt,',') where ID = 1) CustID,
(select SplitData from Split_CLR_Fn(Txt,',') where ID = 2) FName,
(select SplitData from Split_CLR_Fn(Txt,',') where ID = 3) LName,
STUFF((select ',' + SplitData from Split_CLR_Fn(Txt,',') where ID > 3 and ID < (select MAX(ID) from Split_CLR_Fn(Txt,',')) - 1 for XML path('')), 1 , 1,'') Disease,
(select SplitData from Split_CLR_Fn(Txt,',') where ID = (select MAX(ID) from Split_CLR_Fn(Txt,',')) - 1) Email,
(select SplitData from Split_CLR_Fn(Txt,',') where ID = (select MAX(ID) from Split_CLR_Fn(Txt,','))) Phone
from #T
GO
Solution 2: better in this case since the format is constant (this is the solution I wrote about above)
;With MyCTE as (
select
Txt,
SUBSTRING(Txt, 1, CHARINDEX(',', Txt, 1) - 1) as CustID
, SUBSTRING(
Txt
,CHARINDEX(',', Txt, 1) + 1 -- I start from the end of preview len
, CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1)- CHARINDEX(',', Txt, 1) - 1
) as FName
, SUBSTRING(
Txt
,CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1)+1 -- I start from the end of preview len
, CHARINDEX(',', Txt, CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1)+1) - CHARINDEX(',', Txt, CHARINDEX(',', Txt, 1)+1) - 1
) as LName
, RIGHT(Txt, CHARINDEX(',', REVERSE(Txt), 1) - 1) as Phone
, RIGHT(LEFT(Txt, Len(Txt) - Len(RIGHT(Txt, CHARINDEX(',', REVERSE(Txt), 1) - 1)) - 1), CHARINDEX(',', REVERSE(LEFT(Txt, Len(Txt) - Len(RIGHT(Txt, CHARINDEX(',', REVERSE(Txt), 1) - 1)) - 1)), 1) - 1) as Email
from #T
select CustID,FName,LName, Phone, Email, SUBSTRING(Txt, Len(CustID) + Len(FName) + Len(LName) + 4, Len(Txt) - Len(Email) - LEN(Phone) - Len(CustID) - Len(FName) - Len(LName) - 5) as Disease
from MyCTE
I hope that this is useful :-)
Ronen Ariely
[Personal Site] [Blog] [Facebook]
Maybe you are looking for
-
Error Message: "Skype can not start because the system is not available"
Try to reset all Skype settings. Quit Skype or use Windows Task Manager to kill any Skype.exe process. Go to Windows Start and in the Search/Run box type %appdata% and then press Enter or click the OK button. The Windows File Explorer will pop up. Th
-
Not more than one service order against same sales document item
A service order gets created against the sales order item as per standard SAP process. As credit management is active, when the order is under credit block for the customer the service order gets created only after the credit block is released. On r
-
Saving, receiving, uploading
My blackberry z10 won't let me save or upload any file through my browser. I can't receive files on bbm or change my contact picture without going through a long process within pictures. Also, the only way to upload files is for me to share them thro
-
Hi, a small confusion struck in my mind while understanding Groups and Business Systems Transport targets...suppose we have two SLDs SLD1(Dev & QA) SLD2(Prod) 1) Is this is a right structure of SLDs like SLD1(Dev, QA) - > (QA, Prod) SL
-
MDG-M: Error message - CR was not passed as a Parameter
Hi MDG Experts In the MDG-M scenario, after the CR is created and successfully submitted by the Requestor (e.g; Create / Change a Material), when trying to display this CR in the "Display Change Request" menu option, i get the error message - "Change