4 Replies Latest reply on Aug 21, 2012 2:57 PM by JeffJon

    Export/Import Individual Locations from One Environment to the Other

    user3027589
      I have set up some FDM locations within a client's DEV environment, which includes maps, import scripts, import formats, etc. After testing, I need to migrate these locations into the production environement. I know the process to export application elements into an .XML from workbench, however, I have the following concerns about using that functionality:

      - WHen I export Locations I have no option but to export all FDM locations which include locations that I do not want to migrate because they exist in Production as well and I do not want to override them.

      -I am unsure about how the location IDs will be migrated since they will not be the same between the applications. These all all 'new' locations and don't exist in production. Also, Prod is not using the IDs that I am importing in so I would think it would work.

      Is there a better method for doing this that is more efficient than just rebuilding all the locations basically from scratch?
        • 1. Re: Export/Import Individual Locations from One Environment to the Other
          SH_INT
          The export/import via an xml file should only be used when creating a new application. It is not designed to support incremental updates between environments. You will have to create the new locations manually in your Production environment and migrate the mappings by exporting to Excel and then importing to the locations in Production. Bear in mind, if your location ID's are different between environments you will need to update the excel mapping templates before importing them to your Production application
          1 person found this helpful
          • 2. Re: Export/Import Individual Locations from One Environment to the Other
            user3027589
            Thanks for the answer.

            It seems it would be common practice to create new data load locations in a development environment first, and then have the ability to easily migrate to production. It sounds like this is not the case at all.

            Am I at least able to export some other application elements like scripts into an xml and then load them safely to production?

            Edited by: user3027589 on Aug 20, 2012 1:12 PM
            • 3. Re: Export/Import Individual Locations from One Environment to the Other
              beyerch2
              You can do this through SQL relatively easily. I know that is not the officially supported way, though.

              The key information you would need to move would be in

              tPOVPartition - Holds the basic location information
              tStructurPartitionHierarchy - Outlines order of locations
              tStructPartitionLinks - Links Partitions together
              tDatamap - If you created a mapping

              If you created a new import format...
              ---------------
              tBhvLogicGroup - Import formats
              tBhvImpItemFile - Details for Import Format

              If you created a validation entity group for this location
              --------------------
              tBhvValEntGroup - Group information
              tBhvValEntItem - items for the groups

              If you create a specific validation rule group
              --------------
              tBhvValRuleGroup
              tBhvValRuleItem

              Controls Group...
              ------------
              tControlsGroup
              tControlsItem
              tControlsItemLink
              .
              .
              .


              The trick would be to make sure all of the supporting items exist in the destination first such as Import format, Map, Controls Group, etc. You have to BE CAREFUL because the ID in the 'dev' envirionment for these items may not match the new ID (autogenerated or you need to generate it) in the new environment. You'll need to keep note of the proper ID so that when you copy over the location, you provide the right information.

              Then create the location (partition) record. Since the location table does not automatication generate the unique ID, query the table first and determine the highest unique ID, add 1, and use that when you create this record. When you create the hierarchy items, you may need to swap out the old ID with this one. Also, if the hierarchy elements don't exist in destination, you'd need to recreate that as well....

              If you need security, you should be able to locate the appropriate tables.....

              I'm actually in the middle of making a utility to simplify a lot of the FDM tasks to build off of some things I did at Kscope and to prepare for next year... When I get closer to having something public friendly, I'll put it out here. I think you'd appreciate it given your question. ;)
              • 4. Re: Export/Import Individual Locations from One Environment to the Other
                JeffJon
                The scripts are stored on the file system in the <Appname>\Data\Scripts directory. You can easily copy these from the source environment application folder to the target environment application folder and place them in the same directory.