on 01-26-2016 11:35 PM
I"m importing a series of flat files (CSV, though with a pipe delimiter) using the import tool in SAP HANA Studio. For all the other files, the suggested data types are correct, but for one field, it is selecting a BLOB type. Character format is ISO-8859-1 (Latin 1) and there do not appear to be any non-conforming characters. The line size is less than the HANA maximum for NVARCHAR as well. I'm looking for inadvertant line wraps (unclosed quotes, etc.) but have not detected any.
Open to ideas, this is SPS09 with the Studio at patch 97 level.
Thanks,
Donn
Why not simply defined the target table as you like it to be?
The import wizard really just guesses based on what the first 1000 lines (or so) seem to be data type wise.
If you know better (and you should) then by all means: put that knowledge into the table definition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Lars, for the quick response;
In this case there was a lurking unmatched quote that I hadn't found before that was causing the columns to get smashed together, leading the wizard to conclude it had a field longer than 5000 characters, hence the BLOB choice. So by resolving those un-escaped characters the issue was resolved; the proper NVARCHAR field is large, but not that large.
However, that highlights another problem/bug/feature: The SQL IMPORT command seems to be ignoring my "optionally enclosed by" clause. However I want to do some additional diagnosis before declaring it an actual problem.
Donn
Lars,
Meta question (tell me if this is an OK side-band) on a topic or whether I should open a new discussion or whether a support ticket is a better medium):
I'm seeing some unusual results from the IMPORT CSV command on HANA, with the flat file on the Linux system. In particular, the error log messages showing the offending record appear in a quote-enclosed, comma-delimited format even though the flat file is pipe ('|') delimited and has no framing quotes. Is there a conversion being done to each record before it is imported?
I have examples of the source, target table, and errorlog if needed.
Thanks,
Donn
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.