9 Replies Latest reply on Nov 16, 2016 4:06 PM by blafond

    Migrate from static (Designer-built) vdb to dynamic vdb

    don.krapohl

      Our virtual databases are quite large and complex.  For the sake of better code management (can check plaintext vdb into git for example), inheritance (vdb imports), and ease of development we will be migrating our Eclipse-built virtual databases to dynamic vdbs.

       

      We've done an Eclipse project export to DLL XML file and it's too verbose and not in the right format for a vdb.  Are there any tools or extensions that can assist with this project?

        • 1. Re: Migrate from static (Designer-built) vdb to dynamic vdb
          rareddy

          >We've done an Eclipse project export to DLL XML file and it's too verbose and not in the right format for a vdb.

          Can you elaborate what you see as issues ? Because we are using this as the round tripping between dynamic vdb and Designer based one. It is crucial that we need to make this work as well as possible.

           

          >Are there any tools or extensions that can assist with this project?

          You mean Dynamic VDB? No, in feature incarnation of design tools we are focusing to deliver the dynamic vdb directly.

          • 2. Re: Migrate from static (Designer-built) vdb to dynamic vdb
            don.krapohl

            Issues on moving from Designer to dynamic with DDL XML, here's an example of what we get and what we'd expect:

             

            Actual (first few lines only)-

            <?xml version="1.0" encoding="UTF-8"?>

            <ddl generateInfoComments="true"

                 generateTableComments="true"

                 generateColumnComments="true"

                 generateDrops="false"

                 exportDate="2016-11-16"

                 exportTime="13:00:22">

               <model name="MyModel"

             

            ......

             

            Expected (also first few lines)-

            <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

            <vdb name="MyVDB" version="1">

                <description>Some dynamic vdb</description>

                <property name="UseConnectorMetadata" value="true" />

            ....

             

            I would like to understand how we can export a model project including VDBs in a way more consistent with what is seen in a dynamic VDB (like teiid-designer-samples/portfolio-vdb.xml at master · Teiid-Designer/teiid-designer-samples · GitHub ).  For example, the DDL file exported by Eclipse has many attribute containers, attributes with default values are exported, UUIDs are created (no value in dynamic VDB), etc.

            • 3. Re: Migrate from static (Designer-built) vdb to dynamic vdb
              shawkins

              Unfortunately the current DDL export from Designer has a number of issues that have been logged against it.  The most promising path is along the lines of deploying the vdb to the server, then using the admin api to extract the ddl for each of the schemas.  From there you can decide how to put that back together as a vdb - either with inline ddl in the vdb.xml, or still using a .vdb zip file and referencing the ddl files using the ddl-file metadata type.

              • 4. Re: Migrate from static (Designer-built) vdb to dynamic vdb
                don.krapohl

                Marking as correct.  I put in a feature request for it, [TEIID-4585] Eclipse/Designer extension to export a model project as dynamic VDBs - JBoss Issue Tracker .  Thank you as always for your forum support, Steven and Ramesh.

                • 5. Re: Migrate from static (Designer-built) vdb to dynamic vdb
                  rareddy

                  As part of TEIID-2578 I wrote a simple utility that can easily convert a .vdb file into a -vdb.xml file using embedded Teiid. I was thinking of making it as utility and make it available for users to to this exact job. You can see initial workings here teiid/CovertVDBToDDL.java at TEIID-2578 · teiid/teiid · GitHub

                   

                  If you guys think this is viable path, log a JIRA then log a feature request, and we can make this available. Meanwhile, if you want you can tweak to make it work for you. The code showed probably depends upon  other changes I did for TEIID-2578 which are not in master yet.

                  • 6. Re: Migrate from static (Designer-built) vdb to dynamic vdb
                    van.halbert

                    Did you ever try the Teiid designer option to "Generate Dynamic VDB"?  If you create your vdb, then right mouse click on the vdb,  select "Modeling" --> "Generate Dynamic VDB", you should get a dynamic VDB than is ready to deploy. 

                    2 of 2 people found this helpful
                    • 7. Re: Migrate from static (Designer-built) vdb to dynamic vdb
                      rareddy

                      I also believe we need to make tooling be effective in this regard, otherwise we are sidelining/sliding the usage of this feature in Designer.

                      • 8. Re: Migrate from static (Designer-built) vdb to dynamic vdb
                        don.krapohl

                        Sorry, Van.  Your answer did resolve it for us but I can't change my "best answer" vote at this point.

                         

                        Ramesh, understood on the need for supporting this primarily in Designer.  It's a great start for projects for sure but knowing how to migrate away as things become more complex is useful for us.

                         

                        Thanks all.

                        • 9. Re: Migrate from static (Designer-built) vdb to dynamic vdb
                          blafond

                          Don,

                           

                          Teiid Designer is still the primary tool for managing the full range of supported Teiid VDBs and their contents (Up to Teiid 9.0). This includes the standard relational metamodels as well as XML document and Web Service metamodels.  Teiid Designer currently supports Teiid DDL export for relational source and view models. Note that there is no Teiid DDL syntax fro XML or WS models.

                           

                          As Ramesh mentioned.. there is a Modeling > Generate Dynamic VDB action and wizard that can convert a *.vdb into an *-vdb.xml file.  This feature, is of course, still limited to a vdb with relational source and view models.  Note also that for *.vdb's containing user files, user function jars, or schema files.. there is no corresponding method/construct to export to for a simple *-vdb.xml file.

                           

                          The Actual and Expected exported XML in your 2nd comment.. what action/feature did you use to generate the Actual DDL containing the <ddl ...........> element?

                           

                          And I'd be interested on the complexity of your VDB's in general so we can work toward accommodating these in the future.

                           

                          Thx


                          Barry