Cara menggunakan progress mongodb jdbc

This article describes how to connect Tableau to MongoDB Business Intelligence (BI) data and set up the data source.

Before you begin

Before you begin, gather this connection information:

  • Name of the server that hosts the database you want to connect to

  • User name and password, if MongoDB authentication is enabled

  • Database name associated with the user's credentials, if MongoDB authentication is enabled

  • Are you connecting to an SSL server?

  • (Optional) Initial SQL statement to run every time Tableau connects

You must install and run the MongoDB Connector for BI, version 2.1 or later, before you can connect Tableau to your MongoDB BI data.

To get the MongoDB Connector for BI, sign in to the MongoDB website and . Follow the Installation(Link opens in a new window) instructions on the MongoDB website.

Driver required

This connector requires a driver to talk to the database. You might already have the required driver installed on your computer. If the driver is not installed on your computer, Tableau displays a message in the connection dialog box with a link to the Driver Download(Link opens in a new window) page where you can find driver links and installation instructions.

Make the connection and set up the data source

  1. Start Tableau and under Connect, select MongoDB BI Connector. For a complete list of data connections, select More under To a Server. Then do the following:

    1. Enter the name of the server.

    2. If MongoDB authentication is enabled, enter your user name with associated database name, and password. For information about the correct format to use, see . If MongoDB authentication isn't enabled, proceed to step c.

      Select the Require SSL check box when connecting to an SSL server. For more information about connecting with SSL to MongoDB, see Connecting Tableau to MongoDB(Link opens in a new window) on the MongoDB website.

    3. (Optional) Select Initial SQL to specify a SQL command to run at the beginning of every connection, such as when you open the workbook, refresh an extract, sign in to Tableau Server, or publish to Tableau Server. For more information, see Run Initial SQL.

    4. Select Sign In.

      If Tableau can't make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator.

  2. On the data source page, do the following:

    1. (Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.

      The file "isjdbc.config" is the configuration file which is used for the JDBC connector. This file is available or needs to be created if not already present at the location "<IS-Server-Installation>/Server/DSEngine"

      The following entries need to be added (or appended to the already existing entries ) to the file
      CLASSPATH=<IS-Server-Installation>/ASBNode/lib/java/ISmongodb.jar:$CLASSPATH
      CLASS_NAMES=com.ibm.isf.jdbc.mongodb.MongoDBDriver

      CLASSPATH specifies the location of the JDBC Driver for MongoDB database. CLASS_NAMES specifies the class file that needs to be loaded by the JDBC Connector for connecting to the Database

      URLs to be used for connecting to MongoDB using the JDBC Connector by Datadirect JDBC MongoDB drivers

      When the application is reading the data, the following properties need to be specified
      jdbc:ibm:mongodb://<MongoDBServer>:<PortNo>;DatabaseName=<DatabaseName>;SchemaMap=<SchemaMap name>
      for example
      jdbc:ibm:mongodb://<MongoDBServer>:27017;DatabaseName=testdb;SchemaMap=/tmp/SchemaMaps/testMongoDB/schema.config

      When the application is writing the data, the following properties need to be specified
      jdbc:ibm:mongodb://<MongoDBServer>:<PortNo>;DatabaseName=<DatabaseName>;ReadOnly=false
      for example
      jdbc:ibm:mongodb://<MongoDBServer>:27017;DatabaseName=testdb;ReadOnly=false

      Additional details on the connection options of the driver can be found in Progress DataDirect for JDBC for MongoDB  Connection Property Descriptions Page

      Important NoteThe entry “REFRESH MAP” needs to be added to the 'Before SQL Statement' job property, to be used when the tables are created in the KeySpace, once the SchemaMap has been created.

      The user executing the job should have the permissions on the directory containing the config files for SchemaMap 

      [{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"Component":"JDBC Connector","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"11.5, 11.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]