This section is for use when configuring Python 2.7-based nodes. Additionally, this section includes topics such as installing Python modules, API bindings, null handling, handling non-ASCII characters, and Python module support.
If you are familiar with the Python language, you can use Python script to configure and tailor Python-based nodes in Data360 Analyze. The new Python-based nodes run against a Jython implementation of the 2.7 version of Python.
If you are new to Python and would like to learn more about the language, there are many resources available online, for example https://docs.python.org/2/tutorial/.
In this section, you will find information on the Data360 Analyze-specific Python functions and how we bind our records and metadata, as well as the custom Python modules that are provided with Data360 Analyze, see:
- Installing pure Python modules
- API and script bindings
- Null handling
- Non-ASCII characters
- Python module support
Data types and mapping
The following table is aimed at users who are familiar with Data360 Analyze Script and outlines how the Python data types are mapped to the corresponding Data360 Analyze data types:
| Python | Data360 Analyze |
|---|---|
| bool | boolean |
| int | int |
| long | long |
| float | double |
| datetime.date | date |
| datetime.time | time |
| datetime.datetime | datetime |
| str | string |
| unicode | unicode |
Note that Python auto-promotes types in case of overflow. Therefore, it may be possible that, for example, after obtaining an int value from an input record, and modifying it, it can no longer be assigned to an int field on an output record. In such cases, the node will error and indicate that the field is too large for the target field type.