Data360 Analyze

 View Only
  • 1.  Build in functions and libraries

    Posted 12-06-2019 06:20

    Is it possible to build a library or documentation in Data3Sixty behind available functions? It is very time consuming to search an guess what functions might work or not work. 

    For example it might be very useful for an user if available functions get a color like for dataTypes in 'configureFields' so an user can recognize that a function does exist and is possible to use in the tool. Now I have to try many functions from code examples online without knowing if it will work or not in the tool. 

    Maybe also a function prediction. So if you type: uni you get a predictor which says: unicode. I think many users will benefit from this. 

     

     

     



  • 2.  RE: Build in functions and libraries

    Employee
    Posted 12-06-2019 08:08

    The Analyze nodes that utilize the Python language for scripting leverage Jython which is a Java implementation of the Python 2 language specification.

    The Jython implementation shipped with Analyze provides functionality broadly equivalent to that available in the Python Standard Library. You can view the details of the built-in functions included in the Jython Standard Library here. You can see the wider set of functionality supported by Jython here

    When editing the code in a node's property that supports scripting, you can access the list of functions that support tab completion by entering Ctrl+<Space> :

     

    If you know the function you want starts with a particular letter(s) you can enter the initial letter(s) and then use Ctrl+<Space> to display the subset of functions that match the characters you entered.

    There are a number of functions that have been implemented by Infogix that are not in the standard library such as those for handling input/ output metadata e.g. fields(). There are also a few items that are not currently in the tab completion list e.g. unicode() and long() and so do not implement syntax highlighting. 

    The 'Python scripting' topic in the Help documentation provides an overview of use of Python within Analyze. The 'Python scripting' > 'API and script bindings' topic provides details of the supported built-in variables and object types. The 'Python scripting' > 'Python module support' topic details the modules that are automatically imported, namely the 'datetime' module and the 'fn' module. 

    When searching online for information on the Python standard library you may also have seen the equivalent documentation for the Python standard library here. There is a great amount of overlap between this information and that on the Jython Standard Library page and for most circumstances the pages are interchangeable however, the Jython page should be considered the reference source when developing your code (though the Python page has a more pleasant layout).

    Note, we have roadmap items to improve our capabilities to support scripting in future releases.  

    Regards,

    Adrian



  • 3.  RE: Build in functions and libraries

    Employee
    Posted 12-06-2019 08:11

    You may also be interested in viewing the Python cheat sheet article:

    https://support.infogix.com/hc/en-us/articles/360037751033-Python-Cheat-Sheet