Example of
calling the Loader with Python ScriptCreate a database session with the SAP DB Loader
Log on to the database instance
Log off
# Reference to the Python Libraries
# ---------------------------------
import sys
import loader
# Parse the call argume
ntsuserid = sys.argv [1]
password = sys.argv [2]
database_name = sys.argv [3]
data_path = sys.argv[4]
server_node = ''
# Create a database session for the Loader
# ----------------------------------------
session = loader.Loader (server_node, database_name)
# Log on to the database instance
# --------------------------------
session.cmd ('use user %s %s;' % (user
id, password))# Log off
# --------
del session