5 Replies Latest reply on Jun 5, 2008 11:36 AM by jdoyle

    Sample Connector Code

    laxmi83

      Hi ,

      I am new to metamatrix and it would be helpful if anyone give me the sample code for connector to connect to excel or any links to refer for this.

      Thanks,
      laxmi

        • 1. Re: Sample Connector Code
          jdoyle

          MetaMatrix has limited abilities to connecto to Excel spreadsheets as sources. Is this the kind of connection you are looking for? If so, I can follow up with more detailed information.

          ~john

          • 2. Re: Sample Connector Code
            laxmi83

            Hi ,

            Thanks for your reply. I need to create a working sample of excel connector to be done in metamatrix.Could you please help me on how to proceed.

            Thanks,
            laxmi

            • 3. Re: Sample Connector Code
              jdoyle

              You can import meatadata from the spreadsheet using the JDBC importer and the jdbd:odbc bridge driver. The correct syntax for the URL is:

              "jdbc:odbc:Driver={MicroSoft Excel Driver(*.xls)};DBQ=<path-to-excel-file>"

              Once you have created the metamodel and the VDB, you can use the Excel connector to bind to the spreadsheet.

              Some important considerations, there a many more minor considerations:
              This is a read only solution, as Update and Delete are not supported.
              The first row in each spreadsheet should contain the column name, not data.
              The fils should not be open in Excel while importing or querying data.

              BTW, what version of MeataMatrix do you have? Since we're not open yet (we're working very hard on it now), you should be able to get assistance from support?

              ~john

              • 4. Re: Sample Connector Code
                laxmi83

                so first we need to create the metadata and vdb and then only we can import the spreadsheet right.But i am struck up with the connector code to be written .Could you please tell me the steps to be followed to write this connector.If you have any sample code for this ,can you please share with me.I am using version 5.5 SP2.

                Thanks,
                laxmi

                • 5. Re: Sample Connector Code
                  jdoyle

                  We already have the the abilty to import metadata from a spreadsheet with existing importers and we have a conector that can query data contained in a spreadsheet. You would only need to write a connector if the existing technology didn't meet your needs.

                  If your use case it to expose data contained in a spreadsheet through metamatrix, then you do the following:

                  1. Create a new project.
                  2. Import the metadata from the spreadsheet to create a new model.
                  3. Add the model to a VDB.
                  4. Bind the VDB to the spreadsheet with the existing Excel connector.
                  5. Query the data.

                  ~john