How to generate uuid/ id (maybe in data-config.xml...) for table which do not have any primary key.
Scenario : Using DIH I need to import data from database but table does not have any primary key I do have uuid defined in schema.xml and is <field name="uuid" type="uuid" indexed="true" stored="true" required="true" multiValued="false"/> <uniqueKey>uuid</uniqueKey> data-config.xml <?xml version="1.0" encoding="UTF-8" ?> <dataConfig> <dataSource batchSize="2000" name="test" type="JdbcDataSource" driver="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@ldap:...." user="myUser" password="pwd"/> <document> <entity name="test_entity" docRoot="true" dataSource="test" query="select name, age from test_user"> </entity> </document> </dataConfig> Error : Document is missing mandatory uniqueKey field: uuid