IBM DB2
14 min
learn how to connect engini to ibm db2 using engini’s ibm db2 activities, you can create, get and update records to manage and define databases getting started with ibm db2 prerequisites a ibm db2 account add a connection to ibm db2 in engini enter your engini account at https //app engini io https //app engini io navigate to connections page by clicking on the connections on the left sidebar or by clicking here https //app engini io/connections click on the "new integration" option located at the top bar choose ibm db2 option from the available applications enter the following details in the “new integrations” form and press save connection name enter a unique and descriptive name for this connection this name will help you identify and manage the connection in your engini account “ibm db2” by default connection method direct access dns name provide the name of the dsn port specify the port number that the ibm db2 server is listening on database name provide the name of the specific database within the ibm db2 server that you want to connect to username enter the username associated with your ibm db2 this username should have the necessary permissions to access and interact with the database password enter the corresponding password for the provided username make sure the password is accurate to establish a secure connection ccsid specify the ccsid used by your ibm db2 database instance this value must match the character set configured on the database server relevant only for cloud communication channel time zone select the time zone of your ibm db2 server this is used to correctly interpret date and time values returned from the database communication channel choose the appropriate connection type based on your setup cloud if you are connecting to a database hosted in a cloud environment, select “cloud” opa if your database is on premises and you are using an on premises agent (opa) for the connection, select “opa” in this case, an additional field will appear on prem agent choose the specific on premises agent that you want to use for this connection if you have multiple agents configured dsn dsn – for odbc connections, you must have a data source name (dsn) creating data source names (dsn) – ibm documentation dsn name provide the name of the dsn username enter the username associated with your ibm db2 this username should have the necessary permissions to access and interact with the database password enter the corresponding password for the provided username make sure the password is accurate to establish a secure connection communication channel choose the appropriate connection type based on your setup cloud if you are connecting to a database hosted in a cloud environment, select “cloud” opa if your database is on premises and you are using an on premises agent (opa) for the connection, select “opa” in this case, an additional field will appear on prem agent choose the specific on premises agent that you want to use for this connection if you have multiple agents configured time zone – defines the time zone used for all date and time values when reading from or writing to the database communication channel – specifies how the connection communicates with ibm db2 (for example, via cloud or on premise infrastructure) save settings – saves the connection configuration and applies the selected settings note after you’ve saved the connection, you can add additional objects and actions on the right side of the saved connection, you’ll see three dots click on the three dots and then click on “select database objects” a window will open displaying all available entities and actions, just like when you saved your connection from this window, select the new entities and actions you want to use once you’ve finished selecting the additional entities and actions, click save actions create record creates a new record in an ibm db2 table by specifying the target table and providing the field values to insert table click on the empty field and the tooltip will pop up showing all the tables you can use all available tables will be accessible and you can select the specific table for the new record you create add field click add field to add and populate additional fields for the selected activity to learn more about managing activity data, click here https //help engini ai/workflow editor#add fields get records get records from a specified table/view table/view click on the empty field and the tooltip will pop up showing all the tables/views you can use all available tables/views will be accessible and you can select the specific tables/views of the records you want to get top n you can set the number of rows you want to retrieve from the table or view this parameter limits the result set to the specified number of records, with the default being 100 offset if you want to skip a certain number of rows before retrieving data, you can set the offset value the default is 0, meaning no rows are skipped add filter click add filter to define conditions that narrow down the data list and return only the relevant items to learn more about using filters, click here https //help engini ai/workflow editor#add filters add sort click add sort to organize the data list by a selected field in ascending or descending order to learn more about sorting data, click here https //help engini ai/workflow editor#add sorts update record updates existing records in an ibm db2 table by specifying the target table and providing the field values to update table click on the empty field and the tooltip will pop up showing all the tables you can use all available tables will be accessible and you can select the specific table of the record you want to update add field click add field to add and populate additional fields for the selected activity to learn more about managing activity data, click here https //help engini ai/workflow editor#add fields delete records deletes records from an ibm db2 table by specifying the target table and applying filters to identify the records to remove table click on the empty field and the tooltip will pop up showing all the tables you can use all available tables will be accessible and you can select the specific table of the record(s) you want to delete add filter click add filter to define conditions that narrow down the data list and return only the relevant items to learn more about using filters, click here https //help engini ai/workflow editor#add filters create batch of records this activity iterates over a selected data list and for each record in the data list create records for a designated table corresponding to the specified data list data list click on the empty field next to the data list label and the tooltip will popup showing only previous activities than contains data lists from which you can choose choose a data list to iterate on table click on the empty field and the tooltip will pop up showing all the tables you can use all available tables will be accessible and you can select the specific table for the new records you create add field click add field to add and populate additional fields for the selected activity to learn more about managing activity data, click here https //help engini ai/workflow editor#add fields get records batch this activity iterates over a selected data list and for each record in the data list retrieves records from a designated table corresponding to the specified data list data list click on the empty field next to the data list label and the tooltip will popup showing only previous activities than contains data lists from which you can choose choose a data list to iterate on table click on the empty field and the tooltip will pop up showing all the tables you can use all available tables will be accessible and you can select the specific table of the record(s) you want to get top n you can set the number of rows you want to retrieve from the table or view this parameter limits the result set to the specified number of records, with the default being 100 add filter click add filter to define conditions that narrow down the data list and return only the relevant items to learn more about using filters, click here https //help engini ai/workflow editor#add filters add sort click add sort to organize the data list by a selected field in ascending or descending order to learn more about sorting data, click here https //help engini ai/workflow editor#add sorts update batch of records this activity iterates over a selected data list and for each record in the data list updates records from a designated table corresponding to the specified data list data list click on the empty field next to the data list label and the tooltip will popup showing only previous activities than contains data lists from which you can choose choose a data list to iterate on table click on the empty field and the tooltip will pop up showing all the tables you can use all available tables will be accessible and you can select the specific table of the record(s) you want to update add filter click add filter to define conditions that narrow down the data list and return only the relevant items to learn more about using filters, click here https //shared archbee space/public/preview ixqqblwfxopjg0nave78y/preview ycdmxhmvfcwesvtyflkox#add filters add field click add field to add and populate additional fields for the selected activity to learn more about managing activity data, click here https //help engini ai/workflow editor#add fields execute customized sql the “execute customized sql” activity is an activity that allows you to interact with a ibm db2 system by running custom sql queries or commands within your workflow sql in the sql text field, you can write and enter your own sql queries, which are structured commands that define what you want to do with the data in the ibm db2 system these queries can include operations like data retrieval, modification, or database management execute procedure the “execute procedure” activity is an activity that allows you to interact with a ibm db2 system by running stored procedures within your workflow procedure name you need to specify the name of a stored procedure that exists within your ibm db2 database a stored procedure is a pre defined, reusable set of ibm commands that are stored in the database and can be executed on demand add field click add field to add and populate additional fields for the selected activity to learn more about managing activity data, click here https //help engini ai/workflow editor#add fields