Get Data Moving 1
Results 1 to 2 of 2

Thread: How to get User Defined Datatypes to Display in Attunity Studio Dropdown List

  1. #1
    sleski is offline Junior Member
    Join Date
    Apr 2014
    Posts
    3
    Rep Power
    0

    How to get User Defined Datatypes to Display in Attunity Studio Dropdown List

    Does anyone know how to get UDTs to display under the "Data Type" dropdown list in Studio when defining table metadata using the graphical editor? I can specify my UDTs when editing the XML directly, but it would be nice for the type to show up so people know that it's there.

  2. #2
    Join Date
    Sep 2006
    Posts
    233
    Rep Power
    10
    Now this is anunsupported hack that will have to be repeated whenever a new version of Studio is installed but it might help you better use the Attunity Studio. There is no commitment it would work in future versions (but it has been the same for a very long time now so...).

    In this example we'll assume that you have defined two UDTs, udt_dist which is a scaled decimal type and udt_xdate which is a date type. The steps to introduce these types to the Attunity Studio are:


    1. Make sure Studio is not running
    2. Get a ZIP program that allows editing a zip in-place (e.g. the open source 7zip program from SourceForge)
    3. Go to the Studio's plugins directory and open the jar file called com.attunity.connect.common_5.3.3.R5_v20120403.jar with the ZIP program (the number at the end may change based on the specific version of Studio being used)
    4. Copy com.attunity.connect.common_5.1.0.I10_v20080214.ja r to a backup folder so it can be restored if something goes wrong.
    5. Navigate within the jar to com/attunity/connect/common/infrastructure/dataobjects/data path
    6. Edit the file common_datatypes.xml and add at the end the following type definitions:

    HTML Code:
    <type name='udt_dist' uiName='udt_dist' 
             width='4' isScaled='true' essenceType='number'               widthToSize='0'      genericType='decimal'>
              <description>Custom distance</description>
    </type>
    <type name='udt_xdate' uiName='udt_xdate' 
             width='4'  isScaled='false'     essenceType='date'  
             widthToSize='0'      genericType='int_date'>
               <description>Custom date</description>
    </type>

    1. Save the file and the jar
    2. Run Studio now both udt_dist_locn and udt_xdate will be available in the table editor and the udt_dist will allow you to specify the scale (and will also save it).
    By Dror Harari

    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •