Boolean datatype in database profile for custom postgre database connector

Document created by aarthi_sridhar Employee on Feb 1, 2018
Version 1Show Document
  • View in full screen mode

Database profiles represent the data set to be retrieved from or written to a relational database. Data sets contain the SQL code used to select, insert, update, or delete records.
If the table has a column as datatype Boolean, we might have to create an element as In -Parameters. Boomi has standard 3 datatypes available in database profile which are Number, Character, Date/Time. In database profile the parameter is set to character 



You can manually write the query with CAST(? AS BOOLEAN) and create the parameters for the call to the database manually.





Common Questions
Useful links: 

Database profiles 
Adding parametersto a database profile 


Oracle : 

As per the oracle documentation CAST function , The CAST function converts a value from one data type to another and provides a data type to a dynamic parameter (?) or a NULL value. You can try a statement having the v-flag element as In-Parameter in database profile say for example : SELECT CAST(v_flag AS VARCHAR(10)) INTO V_RESULT 

SQL Server:

Here are some tips on how we can handle cast in statement level in Microsoft SQL server : Data Type Conversion (Database Engine) 

MySQL CAST() Function  explains about casts in statement. 
Note: These links are only subject to samples of cast in sql statement. Casting to out/In- parameters in Boomi database profile requires proper logical evaluation based on what is the datatype of the column.