Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Preprocessor Jar Query

sandeepverma
Regular Contributor
Regular Contributor

Hi Team,

I am referring to Saviynt doc to develop the jar. 

docs-be.saviyntcloud.com/bundle/EIC-Admin-v23x/page/Content/Resources/Attachments/ConnectionUtlitySe...

I am attaching the Java code that I am using to develop the jar and preprocessor block and CSV file to upload the user in Saviynt.

I am trying using csv file-based import, but no data is updated in Saviynt. 

Log Error:

sandeepverma_0-1697090817931.png

Could you please assist here.

[Merged reply comment]

Hi Team,

I tried with a generated jar for the below Java code but received broken pipe error.

package com.saviynt.utility.tv;
 
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Map;
 
public class TV {
 
public void removeAccents(Connection connection, Map<String,String> tempTableNamesMap) throws Exception {
        
String metaDataQuery="select firstname,lastname,username from "+ tempTableNamesMap.get("NEWUSERDATA");
        //String existingUsernames="select username from "+ tempTableNamesMap.get("CURRENTUSERS");
        ResultSet rs1;
        CallableStatement cstmt=null;
        try{
 
            Statement statement=connection.createStatement();
            rs1=statement.executeQuery(metaDataQuery);
            while(rs1.next()){
                
                String updateQry="UPDATE " + tempTableNamesMap.get("NEWUSERDATA") + " SET lastname = CONCAT(firstname,'-',lastname)";
                cstmt=connection.prepareCall(updateQry);
                cstmt.execute();
                if (!connection.getAutoCommit()) {
                    connection.commit();
                }
            }
            System.out.println("Preprocessor Logic Ending!");
        }
        catch (Exception e){
            System.out.println("Exception Occurred: "+e);
        }
    }
 
}

could you please let me know where I made a mistake?
 
Thank you

Sandeep

[This message has been edited by moderator to merge reply comment]

2 REPLIES 2

nimitdave
Saviynt Employee
Saviynt Employee

@sandeepverma Pls try below :

1. try csv upload without preprocessor jar, if the upload works?

2. include only logger to print connection and tablemap details and then use preprocessor jar with upload. if this works?

sandeepverma
Regular Contributor
Regular Contributor

Hi @nimitdave 

Thanks for your reply.
Yes, first option is working without jar.

I need to check second option as per your suggestion.

Thank you,