FME Transformers: 2025.1 BETA

TestSuite.DatabaseWriterValidator

Creates a diffable ASCII file of a database table by using an external dump utilities.

This transformer sets up the validation for a test that loads data into a database. The TestSuite.DatabaseWriterValidator uses an external executable for the database in question to generate validation files. These files are ASCII representations of specified tables in the database.

Note  The Testsuite.DatabaseWriterValidator steals the database connection parameters from the writer in the workspace this transformer is present in. Consequently, this transformer cannot be used if a MULTI_WRITER is used going to different databases (that is, you can only have one database writer in the test).

Input Ports

None.

Output Ports

Validation files.

Parameters

Advanced (Optional)

Supported Database Types

Supported File Types (Short Name)

  • GEODATABASE_FILE
  • Personal Geodatabase (MDB)/Enterprise Geodatabase
  • ORACLE_SPATIAL
  • ORACLERASTER
  • ORACLEPOINTCLOUD
  • ORACLE_NONSPATIAL
  • ORACLE_RELATIONAL
  • SDE30
  • SDERASTER
  • MDB
  • MDB_ADO
  • MSACCESS_JDBC
  • EXCEL
  • XLS_ADO
  • MySQL
  • MSSQL_ADO
  • MSSQL_SPATIAL
  • MSSQL_AZURE
  • MSSQL_AZURE_SPATIAL
  • FM0
  • FM0_SQL
  • FDO
  • SQLITE3
  • IMX
  • GEOPACKAGE
  • SPATIALITE
  • 3DS

External Utilities Used

For File Geodatabase, Personal Geodatabase, Enterprise Geodatabase, and ArcSDE the ArcObjects XML export is called and then reformatted by the geodbtoxml utility (which is checked in as part of the testsuite/harness in CVS).

For MySQL, the mysqldump.exe command line tool (which is documented at https://dev.mysql.com/doc/mysql/en/mysqldump.html) is used.

Postgres formats are not supported because pg_dump

(https://www.postgresql.org/docs/8.0/app-pgdump.html) randomly fails, making tests flaky. psql has the same issue.

For Oracle, sqlplus is used and a select * from tablename; is used to dump the contents of the table. sqlplus must have been installed and must be in the path for this to work.

For OracleRaster, sqlplus is used to do a host of queries; the georaster column name must be "RAST" and is used to dump the contents of the georaster. Currently only validates the first palette on the first band. sqlplus must have been installed and must be in the path for this to work.

For OraclePointCloud, sqlplus is used to do a host of queries. sqlplus must have been installed and must be in the path for this to work.

For MSSQL_ADO,MSSQL_SPATIAL, MSSQL_AZURE, and MSSQL_AZURE_SPATIAL bcp.exe is used to dump tables. Make sure that the table name is specified as <owner>.<table name>. Table names with special characters (spaces, dollar signs, etc.) are not supported.

For MDB, MDB_ADO, MSACCESS_JDBC, EXCEL and XLS_ADO, mdb2xml and xls2xml convert the entire file to XML. All tables will be converted. Table names do not need to be specified and will be ignored. Since this transformer is not able to keep destination dataset file names, "FME_MF_DIR_UNIX/DestValidData/out put.xls" will be used. Note the space in the file name.

For FM0, mdb2xml is used to convert the file to XML. The specification file in fm0.mdb2xml.txt is used to ignore certain fields such as GUIDs. Since this transformer is not able to keep destination dataset file names, "FME_MF_DIR_UNIX/DestValidData/out put.mdb" will be used. Note the space in the file name.

For FM0_SQL, mssql2xml is used to convert the file to XML. The specification file in fm0.mssql2xml.txt is used to specify GeoMedia metadata tables, and to ignore certain fields such as GUIDs.

For SQLITE3, IMX, GEOPACKAGE, and SPATIALITE the official sqlite3 binary is used to dump databases into text files. If table names may be specified, then each table will be dumped separately into a file with the same name as the table. Otherwise, all tables will be dumped into a file called "output.txt". Since this transformer is not able to keep destination dataset file names, "FME_MF_DIR_UNIX/DestValidData/out put.db" will be used, or "FME_MF_DIR_UNIX/DestValidData/out put.gpkg" for GEOPACKAGE. Note the space in the file name.

For FDO, the validation method differs based on the underlying provider.

For 3DS, the data is dumped to a text file using 3dsdump.exe with the commands -m (materials), -t (trimeshes), -l (lights), -i (instances), -c (cameras), -n (node hierarchy). A simple diff is then done on the text file.

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Transformer Categories

TestSuite Tools (Safe Internal)