Categories

Versions

You are viewing the RapidMiner Studio documentation for version 9.0 - Check here for latest version

Write Access (JDBC Connectors)

Synopsis

This operator writes an ExampleSet into the specified Microsoft Access database.

Description

The Write Access operator is used for writing an ExampleSet into the specified Microsoft Access database (.mdb or .accdb extension) using the UCanAccess jdbc driver. You only need to have a basic understanding of databases in order to use this operator properly. Please go through the parameters and the attached Example Process to understand the working of this operator.

Input

  • input (Data Table)

    This input port expects an ExampleSet. It is output of the Retrieve operator in the attached Example Process.

Output

  • through (Data Table)

    The ExampleSet that was provided at the input port is delivered through this output port without any modifications. This is usually used to reuse the same ExampleSet in further operators of the process.

  • file (File)

    This port memory buffers file object for passing it to the reader operators

Parameters

  • database_fileThis parameter specifies the path of the Access database ( i.e. the mdb or accdb file) Range: filename
  • usernameThis parameter is used for specifying the username of the database (if any). Range: string
  • passwordThis parameter is used for specifying the password of the database (if any). Range: string
  • table_nameThis parameter is used for specifying the name of the required table from the specified database. Range: string
  • overwrite_modeThis parameter indicates if an existing table should be overwritten or the data should be appended. Range: selection
  • access_versionIf a new database is created this parameter specifies its format version. This parameter is not used if the database already exists. Range: selection

Tutorial Processes

Writing and then reading data from an Access database

The 'Golf' data set is loaded using the Retrieve operator. The Write Access operator is used for writing this ExampleSet into the golf table of the 'golf_db.mdb' database. The database file parameter is provided with the path of the database file 'golf_db.mdb' and the name of the desired table is specified in the table name parameter ( i.e. it is set to 'golf'). A breakpoint is inserted here. No results are visible in RapidMiner at this stage but you can see that at this point of the execution the database has been created and the golf table has been filled with the examples of the 'Golf' data set.

Now the Read Access operator is used for reading the golf table from the 'golf_db.mdb' database. The database file parameter is provided with the path of the database file 'golf_db.mdb'. The define query parameter is set to 'table name'. The table name parameter is set to 'golf' which is the name of the required table. Continue the process, you will see the entire golf table in the Results Workspace. The define query parameter is set to 'table name' if you want to read an entire table from the database. You can also read a selected portion of the database by using queries. Set the define query parameter to 'query' and specify a query in the query parameter.