on 01-25-2012 7:03 PM
Hi there,
I'm facing some problems with having to dissect a string (it contains adresses) into its componenents. This should be feasible by using appropriate regular expressions, but I don't see any way to use them in HANA.
Did I miss something, or is it just not possible?
As an alternative I am currently considering to do the split in ABAP using a secondary DB connection to read and write in HANA, but I do not really like this idea. This seems to be a somewhat clumsy approach and will be very time consuming as I need to process several million recors.
Any ideas or help?
Regards
Andre
Hello Andre,
at the moment there is no RegEx support build into HANA, but I guess it will be added sooner or later.
Meanwhile I see two additional options that might be feasible:
- if you need to perform the transformation as part of a data loading process, why don't you do it with BO Data Services?
- if the transformation needs to be done on the fly a SQL script procedure might be the right thing for you.
regards,
Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may want to consider R Language for Regular Expressions in SAP HANA.
http://help.sap.com/hana/SAP_HANA_R_Integration_Guide_en.pdf
Regular Expressions with grep, regexp and sub in the R Language
Regards,
itsvtk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I went for an ABAP solution, I'm creating an additional table in the ABAP system to hold the addresses and will drop the source column from the original table when I'm done.
In case your interested, my code to extraxt postal code and city (the country was determined and stripped from the string earlier)
if ms_address-country = 'DE'.
*-Finde den Beginn der PLZ inkl. umschliessender Whitespaces
find first occurrence of
regex 'sd{5}s'
in mv_string
match offset lv_offset.
if sy-subrc = 0.
add 1 to lv_offset.
ms_address-post_code = mv_string+lv_offset(5).
lv_city = lv_offset + 6.
ms_address-city = mv_string+lv_city.
endif.
endif.
Edited by: Andre Köster on Jan 26, 2012 12:51 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.