Databases
Altova website: Database mapping
MapForce enables you to use databases as data sources and targets.
The table below lists all the supported databases. If your Altova application is a 64-bit version, ensure that you have access to the 64-bit database drivers needed for the specific database you are connecting to.
Database | Notes |
---|---|
Apache CouchDB 3.x | NoSQL database. For details, see the CouchDB documentation. To find out how to work with NoSQL databases in MapForce, see NoSQL Databases.
|
Azure CosmosDB | Azure CosmosDB is a NoSQL, relational, and vector database. To find out how to connect to this database, see Azure CosmosDB Connection. For information about how to work with NoSQL databases in MapForce, see NoSQL Databases. For more information about the database, see the following articles:
•Azure Cosmos BD (product page) •Azure Cosmos DB - Database for the AI Era •Azure Cosmos DB Documentation
|
Firebird 2.x, 3.x, 4.x | |
IBM DB2 8.x, 9.x, 10.x, 11.x | |
IBM Db2 for i 6.x, 7.4, 7.5 | Logical files are supported and shown as views.
|
IBM Informix 11.70 and later | Informix supports connections via ADO, JDBC and ODBC. The implementation does not support large object data types in any of the code generation languages. MapForce will generate an error message (during code generation) if any of these data types are used.
|
MariaDB 10 and later | MariaDB supports native connections. No separate drivers are required.
|
Microsoft Access 2003 and later | At the time of writing (early September 2019), there is no Microsoft Access Runtime available for Access 2019. You can connect to an Access 2019 database from Altova products only if Microsoft Access 2016 Runtime is installed and only if the database does not use the "Large Number" data type.
|
Microsoft Azure SQL Database | SQL Server 2016 codebase
|
Microsoft SQL Server 2005 and later Microsoft SQL Server on Linux | |
MongoDB 4.x | NoSQL database. For more details, see the MongoDB documentation. To find out how to work with NoSQL databases in MapForce, see NoSQL Databases.
|
MySQL 5 and later | MySQL 5.7 and later supports native connections. No separate drivers are required.
|
Oracle 9i and later | |
PostgreSQL 8 and later | PostgreSQL connections are supported both as native connections and driver-based connections through interfaces (drivers) such as ODBC or JDBC. Native connections do not require any drivers.
|
Progress OpenEdge 11.6 | |
SQLite 3.x
| SQLite connections are supported as native, direct connections to the SQLite database file. No separate drivers are required. |
Sybase ASE 15, 16 | |
Teradata 16 | Connections are supported through ADO.NET, JDBC, and ODBC.
When a mapping inserts data into a database table, database-generated identity fields are not supported.
|
Database mappings in various execution environments
When you generate program code from a mapping, compile a mapping to MapForce Server execution files, or deploy a mapping to FlowForce Server, the database connection details saved with the generated files are adapted to drivers supported for the chosen target environment (see table below). For example, if the mapping transformation language is set to Java, ADO connections are converted to JDBC when Java code is generated from the mapping.
When the mapping is executed in an environment other than MapForce, you will need to make sure that the database connection details are meaningful on the machine which executes the mapping (e.g., you may need to check if the database driver is installed, the database path is correct, the database server is accessible, etc.).
Some database connection types are not supported in some target environments, as shown in the table below.
Connection type/Execution Environment | C# | C++ | Java | MapForce Server on Windows | MapForce Server on Linux/Mac |
---|---|---|---|---|---|
ADO | ADO bridge | As is | Converted to JDBC | As is | Converted to JDBC |
ADO.NET | As is | User defined | Converted to JDBC | As is | Converted to JDBC |
JDBC | User defined | User defined | As is | As is | As is |
ODBC | ODBC bridge | ODBC bridge | Converted to JDBC | As is | Converted to JDBC |
Native PostgreSQL | Not supported | Not supported | Not supported | As is | As is |
Native SQLite | Not supported | Not supported | Not supported | As is | As is |
Table legend:
•As is means that the database connection type (e.g., JDBC) remains as defined in MapForce.
•Converted to JDBC means that the database connection will be converted to a JDBC-like database connection URL.
•ADO bridge and ODBC bridge mean that the connection string remains as defined in MapForce, but the generated code will use a suitable class which acts as an ADO bridge or ODBC bridge, respectively (e.g., System.Data.OleDb.OleDbConnection or System.Data.Odbc.OdbcConnection).
•User defined means that, in order for the connection to work in generated code, you will need to manually enter the connection details into the Database Component Settings dialog box.
Preventing possible issues with JDBC connections in Java environment
If the mapping connects to a database through JDBC, ensure that the JDBC driver used by the mapping is installed on your system. To view the current JDBC settings of any database component in MapForce, double-click the database component's header. This will open the Component Settings dialog. For more information, see Database Component Settings and Creating a JDBC connection.
If the mapping uses a non-JDBC database connection, the connection may be converted to JDBC during Java code generation, to provide compatibility in a Java environment. For details, see the table above.
If you run the generated Java application, the JDBC driver may need to be added as a classpath entry to the current configuration. Otherwise, running the application could result in an error similar to the following: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.
This subsection discusses some of the possible approaches to fixing JDBC-related issues.
Approach 1: Add JDBC driver as a dependency in Eclipse
If you work with Eclipse, you will need to add a JDBC driver as a dependency as follows:
1.Generate Java code in MapForce and import the project into Eclipse, as described in Generate, Build, and Run Code.
2.Click the desired configuration in Eclipse (e.g., MappingApplication).
3.In the Dependencies tab, click Classpath entries and then click Add External JARs.
4.Browse for the .jar file of your JDBC driver (e.g., C:\jdbc\mysql\mysql-connector-java-5.1.16-bin.jar).
5.Click Run to run the program with the database JDBC driver added as a dependency.
Approach 2: Add JDBC driver to classpath of test task in build.xml
If you get an error related to the JDBC driver when you run the Ant build.xml file, add the JDBC driver to the classpath of the test task in build.xml. The code listing below is an example of an Ant test task that includes a reference to the .jar file of the JDBC driver (highlighted in yellow below).
<target name="test" depends="compile">
<java classpath="C:\codegen\java\mysql_mapping" classname="com.mapforce.MappingConsole" fork="true" failonerror="true">
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="C:\jdbc\mysql\mysql-connector-java-5.1.16-bin.jar"/>
</classpath>
<arg line="${cmdline}"/>
</java>
</target>
Approach 3: Include JDBC driver in application's manifest
If you build JAR files from the generated Java application, you will need to add a reference to the database driver in the manifest section of the build.xml file. This ensures that the reference to the database driver is available in the manifest (MANIFEST.MF) file after you build the project.
To add the database reference to the manifest file, take the steps below:
1.Locate the manifest element in the build.xml file.
2.Add a new element called attribute where the name attribute is Class-Path and the value attribute is the name of the .jar file. For example, for MySQL 5.1.16, the updated manifest file could look as follows (note the line highlighted in yellow):
<manifest file="C:\codegen\java\mysql_mapping/META-INF/MANIFEST.MF" mode="replace">
<attribute name="Created-By" value="MapForce 2025"/>
<attribute name="Main-Class" value="com.mapforce.MappingConsole"/>
<attribute name="Class-Path" value="mysql-connector-java-5.1.16-bin.jar"/>
</manifest>
3.Copy the JAR file of the JDBC driver to the folder that contains the JAR file of the generated application.