2 Replies Latest reply: Apr 17, 2014 2:58 PM by Gmfeinberg-Oracle RSS

    CLI Command bug

    dvohra21

      The following set of commands do not actually add a table.

       

      table create -name catalog

      add-field -type STRING -name catalogId

      add-field -type STRING -name journal

      add-field -type STRING -name publisher

      add-field -type STRING -name edition

      add-field -type STRING -name title

      add-field -type STRING -name author

      primary-key -field catalogId

       

       

      exit

       

       

      kv-> plan add-table -name catalog -wait

      Table already exists: catalog

      kv-> show tables

      Tables:

              catalog

       

       

      kv-> plan add-table -name catalog -wait

      Table already exists: catalog

      kv-> table list

      Tables to be added:

              catalog

      kv->

       

      The table list command is still listing the table as "Tables to be added".

        • 1. Re: CLI Command bug
          dvohra21

          The set of commands that does not create a table.

           

          table create -name catalog

          add-field -type STRING -name catalogId

          add-field -type STRING -name journal

          add-field -type STRING -name publisher

          add-field -type STRING -name edition

          add-field -type STRING -name title

          add-field -type STRING -name author

          primary-key -field catalogId

           

           

          exit

          plan add-table -name catalog -wait

          • 2. Re: CLI Command bug
            Gmfeinberg-Oracle

            Hi,

             

            It would appear that the table named "catalog" was already added, as indicated by the output of "show tables."  You can't add the same table twice.

             

            One point of confusion might be that when you create the table using "table create" in the CLI it first constructs an entirely transient table that exists only in the context of the CLI process. The CLI does not check to see if the table exists at that time.  The "plan add-table" command is what actually creates the table in the store.  Because that failed (due to the table already existing) the "catalog" table was left in the CLI's list of tables waiting to be added (table list).

             

            You can remove a table from the store using "plan remove-table -name <table name>" but be aware that this command will remove the table and all of its data by default.

             

            Regards,

            George