import org.apache.log4j.Level;import org.apache.log4j.Logger;import sailpoint.plugin.PluginBaseHelper;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
Logger log = Logger.getLogger("sailpoint.rules.ReadDBTable");
log.setLevel(Level.DEBUG);
log.debug("-----------------------------------");
Connection connection = PluginBaseHelper.getConnection();
log.debug("Connection established to DB: " + connection.getCatalog());
ResultSet resultSet = null;
PreparedStatement preparedStatement = null;
try{
String selectQuery = "SELECT COLUMN_NAME FROM TABLE_NAME; ";
preparedStatement = connection.prepareStatement(selectQuery);
log.debug("Executing the query: " +selectQuery);
resultSet = preparedStatement.executeQuery();
while(resultSet.next()){
String column_value = resultSet.getString("COLUMN_NAME");
log.debug(column_value);
}
} catch(Exception e){
log.error("Exception occurred: " +e);
}
connection.close();
"Knowledge grows when you share". I would like to share my knowledge on Identity and Access Management.
Saturday, January 8, 2022
Rule to Read Database Table
Subscribe to:
Post Comments (Atom)
Form AllowedValues rule to filter Identities with Active Regular Active Directory accounts and identity is active and correlated
The rule type is AllowedValues. import org.apache.log4j.Level ; import org.apache.log4j.Logger ; import sailpoint.object.Filter ; import sa...
-
This post provides the steps to install Sailpoint IdentityIQ 7.3 for a micro footprint installation topology. Please check the SailPoint II...
-
Beanshell script to display all the entitlements assigned to an identity: import java.util.List; import java.util.Iterator; import sailpoin...
-
While onboarding a delimited file connector in SailPoint you may encounter the error: To parse the file you must specify either a delimite...
No comments:
Post a Comment