Search code examples
javaspringsap-commerce-cloudhotfolder

Translating a string to warehouse object in hotfolder


We are currently receiving a CSV outside our organization. This is to update the table StockLevel. When we receive the CSV, instead of the actual warehouse code, we receive a dealer code in 2nd column. What I did is I created a translator which should map the dealer code and convert it to the correct warehouse. The problem is that I'm getting errors. When I removed the 2nd translator, it is working so I guess that the cause was the placement of the translator. Do you know how I can do what I need to do using translator correctly?

Impex:

INSERT_UPDATE StockLevel;productCode[unique=true][translator=tau.com.kapa.core.dataimport.stock.QwentaniumStockImportTranslator];warehouse(code)[unique=true][translator=tau.com.kapa.core.dataimport.stock.QwentaniumStockImportDealerTranslator];available "00440-3007";"133180";"1"

Error:

INFO  [AzureIntegrationTaskExecutorThread-master-1] (000099CE) [QwentaniumStockImportDealerTranslator] Number of sellers during SFTP job: 3
INFO  [AzureIntegrationTaskExecutorThread-master-1] (000099CE) [QwentaniumStockImportDealerTranslator] Dealer number in SFTP job: 133180 matches with seller: 10814-Goliath
ERROR [AzureIntegrationTaskExecutorThread-master-1] (000099CE) [FlexibleSearch] line 3 at main script: Flexible search error occured...
WARN  [AzureIntegrationTaskExecutorThread-master-1] (000099CE) [ImpExImportReader] line 3 at main script: dumped unresolved line ValueLine[unresolvable:SQL search error - enable the property 'flexible.search.exception.show.query.details' for more details,line 3 at main script,null,HeaderDescriptor[line 2 at main script, insert_update, StockLevel, {}, [productCode, warehouse, available] ],{1=ValueEntry('00440-3007'=00440-3007,unresolved=false,ignore=false), 2=ValueEntry('133180'=WH_STORE02-Goliath,unresolved=false,ignore=false), 3=ValueEntry('1'=null,unresolved=null,ignore=false)}]
ERROR [AzureIntegrationTaskExecutorThread-master-1] (000099CE) [CronJobErrorHandler] line 3 at main script: Exception ocurred, will ignore: de.hybris.platform.impex.jalo.ImpExException: SQL search error - enable the property 'flexible.search.exception.show.query.details' for more details[HY--1]
de.hybris.platform.impex.jalo.ImpExException: SQL search error - enable the property 'flexible.search.exception.show.query.details' for more details```

Solution

  • I just realized that I was looking the issue incorrectly. The problem was I was returning a warehouse code which is a string when the correct one was returning the warehouse object itself.