on 2017 Aug 02 10:45 PM
Hi, my problem statement is - to fetch the uid and name on the basis of uids(A CSV which has a list of uids) that I input.
Now this can be done by following query:
"#% impex.setTargetFile( ""Customer.csv"" );" insert_update Customer;uid[unique=true];name; "#% impex.exportItemsFlexibleSearch( ""select {pk} from {Customer} where {uid} in ('testcustomer1@gmail.com','testhello1@gmail.com')"");"
The result in csv will be the following:
# uid;name
testcustomer1@gmail.com;Test1|Customer1
testhello1@gmail.com;Test|Hello
But, the issue is that for 2 uids its easy, for 600k customers if to fetch out of 1200k is tough. I have a CSV of email ids from which I wish to refer here so that the list can be used directly somehow instead of manually adding 600k customers.
Kindly provide a solution for the same.
Thanks in advance.
600k email addresses in 'in' clause is not good idea, it may not work as in dependents on database engine. Other option could be to import all email addresses in another custom Type and then join this new Type with Customer Type.
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
This can be done by groovy script please find the attached script and modify accordingly.Run this in HAC(localhost:9001/hac/console/scripting/ ) . check Generated user CSV file in hybris directory link text
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For these kind of complex scenario's please do write a beanshell script. So that you can export this data better than an impex exporter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.