Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement to split the email ID to get the domain Name like
from abc@gmail.com to get gmail.com in tmap.
in other words i want to get everything after "@". please help.
Hi
You can use the following expression :
row1.email.split("@")[1]
If we consider that your input row for the email is called row1.email.
Warm regards,
Martin
Hi @mhodent ,
Thank you for your reply, but still i am not able to achieve what i wanted to.
i am getting below error.
Exception in component tDBInput_4_in (STG_TO_WAREHOUSE_USER)
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'ST_USER_TEST.Email_Domain' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2781)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1569)
at local_project.stg_to_warehouse_user_0_1.STG_TO_WAREHOUSE_USER.tDBInput_4_inProcess(STG_TO_WAREHOUSE_USER.java:2050)
at local_project.stg_to_warehouse_user_0_1.STG_TO_WAREHOUSE_USER.runJobInTOS(STG_TO_WAREHOUSE_USER.java:3943)
at local_project.stg_to_warehouse_user_0_1.STG_TO_WAREHOUSE_USER.main(STG_TO_WAREHOUSE_USER.java:3792)
[statistics] disconnected
Can you send a picture of your job ? It would be easier to understand with it.
Check if the column name is the good one (Unknown column 'ST_USER_TEST.Email_Domain' in 'field list')
Not sure but replace ST_USER_TEST with USERS_MAIN when you call your input row int the tmap
Picture of the tmap would help
Hi @TRF ,
i am not able to get the desired results yet.
below is the error i'm getting.
Exception in component tDBInput_4_in (STG_TO_WAREHOUSE_USER)
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'ST_USER_TEST.Email_Domain' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2781)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1569)
at local_project.stg_to_warehouse_user_0_1.STG_TO_WAREHOUSE_USER.tDBInput_4_inProcess(STG_TO_WAREHOUSE_USER.java:2050)
at local_project.stg_to_warehouse_user_0_1.STG_TO_WAREHOUSE_USER.runJobInTOS(STG_TO_WAREHOUSE_USER.java:3943)
at local_project.stg_to_warehouse_user_0_1.STG_TO_WAREHOUSE_USER.main(STG_TO_WAREHOUSE_USER.java:3792)
[statistics] disconnected
This error is due to your SQL query.
Column Email_Domain doesn't exist in ST_USER_TEST table.