3 Replies Latest reply on Oct 30, 2013 12:26 PM by rareddy

    Using Hive2 as a data source

    bzarboni

      Hi all,

       

      I'm a relatively new user of teiid, and l like what I've seen so far. I've been connecting to flat files and RDBMS without many issues, but now I need to connect to a Hive data source.

       

      I've been having a little trouble getting it working though. For reference, I'm creating my source views in the designer (8.2) using teiid 8.4 as a server. I can create the connection fine, but when I get to the view that allows me to select tables to import, the designer throws a "Method not supported" message inside of a SQLException.

       

      Digging down into the Hive jdbc driver code, it looks as though the designer is trying to call getCatalogName, which only throws a SQLException of "Method not supported". I was wondering if this is due to incompatibility because of Hive being upgraded to hive2? Is there a workaround I can do?

       

      Thanks all

        • 1. Re: Using Hive2 as a data source
          rareddy

          In Teiid Designer there is new importer called "Teiid Connection >> Source model", use that importer for building the source model for Hive. The traditional JDBC importer with Hive will not work as the Hive JDBC drivers metadata capabilities are some what limited right now.

           

          This new importer will use Teiid's translator capabilities to import the metadata.

           

          HTH

           

          Ramesh..

          • 2. Re: Using Hive2 as a data source
            bzarboni

            Thanks Ramesh,

             

            That seemed to work (although the designer threw exceptions if I tried to import into and existing modeling project... maybe the designer team needs to be aware).

             

            I've got a follow-up question for you about the import however: It seems as though there's a way to define source models outside of the designer. I think I've seen hints in this forum about either through code or configuration files? Is there a preferred way to do source / view modeling that is not using Teiid Designer? if so, is there any documentation / tutorials that I can refer to?

             

            Thanks again!

            • 3. Re: Using Hive2 as a data source
              rareddy

              Ben,

              That seemed to work (although the designer threw exceptions if I tried to import into and existing modeling project... maybe the designer team needs to be aware).

              Can be be specific about what exceptions you saw?

               

              there a preferred way to do source / view modeling that is not using Teiid Designer? if so, is there any documentation / tutorials that I can refer to?

              Yes, it is called "Dynamic VDB", it is simple XML file. You need to either hand code it or programatically create it. There are many questions on the forum and documentation on this subject. In this you use DDL to define your views. See VDB Definition - Teiid 8.6 (draft) - Project Documentation Editor

               

              Also checkout examples at Home - Teiid Examples - Project Documentation Editor

               

              You pretty much do everything you can do in Designer with dynamic vdbs, except for some complex webservice/xml modeling stuff. However, Designer makes it easy to develop.

               

              Ramesh..