5 Replies Latest reply: Oct 31, 2013 6:58 PM by Steve Dark RSS

    How to modify scrip from a binary load

      Hi all!

       

      How can I  modify the script loading from a binary?

      I am loading data from a Qvw file and I need to modify some fields....how can I find the list of loaded fields into the script editor?

       

      Thanks

       

      Francesco

        • How to modify scrip from a binary load
          Stefan Wühl

          The script from the original file is not accessible from the script you put the binary load in.

           

          If you can open the original file, just copy the field names as necessary to the new file.

          If you can't open the file / access the script, you can look at the table viewer (CTRL-T) or use the system table to have a look at the fields used.

           

          I think you would need to do a resident load if you want to transform some fields.

          • How to modify scrip from a binary load
            Miguel Angel Baeyens de Arce

            Hi Francesco,

             

            The binary load does only load tables and fiels (and values, of course). But once you have binary loaded a file, you can get to the Table Viewer, or use two listboxes with system fields $Table and $Field where all tables and all fields are listed.

             

            Of course, you can do RENAME, DROP, LOAD ... RESIDENT from the tables already existing, although you cannot change the original script, because it is on a different file.

             

            Hope that helps.

             

            Miguel

              • Re: How to modify scrip from a binary load
                m m

                Hi Miguel

                 

                How is the question here. If i do binary load. Even though i can see the tables in table viewer, nothing is there in script to modify.

                 

                Question is how do you modify fields, rename them, drop them etc.

                 

                a working .QVW example would be very helpful.

                 

                 

                thanks

                  • Re: How to modify scrip from a binary load
                    Steve Dark

                    After a binary load the data model is (as you have seen) intact, and the script is effectively as it is at the end of the script running in the QVW you have done a binary load from.

                     

                    This means that you can issue statements like DROP TABLE and DROP FIELD to remove items from the data model.  If you wish to rename fields you will need to do a RESIDENT load and use the AS statement to do the rename.

                     

                    Given the main advantage of a Binary Load is its speed and that Resident loads are inherently reasonably slow - you might want to steer clear of renaming of fields in this way - and perhaps rename any fields in the QVW you are loading from?

                     

                    Hope that helps,

                    Steve

                • Re: How to modify scrip from a binary load

                  You can't modify the script as such. A binary load doesn't get the script from the other QVW but gets the already loaded datamodel. What you can do though is modify the datamodel. You can perform resident loads of tables in the model, join to tables in the model, drop tables and/or fields from it, etc etc

                   

                   

                  Matt