-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4924 from bamaer/4921
added data type docs. fixes #4921
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
docs/hop-user-manual/modules/ROOT/pages/snippets/hop-concepts/data-types.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//// | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
//// | ||
|
||
== Data types | ||
|
||
As a best practice for producing consistent, predictable outcomes when working with your data in Apache Hop, you must consider how the Apache Hop engine processes different data types and field metadata in transformations and jobs. | ||
|
||
NOTE: As a rule, data is never modified by metadata inside of Apache Hop. Data is only modified when Apache Hop writes to files or similar objects, but not to databases. | ||
|
||
Apache Hop data types map internally to Java data types, so the Java behavior of these data types applies to the associated fields, parameters, and variables used in your workflows and pipelines. The following table describes these mappings. | ||
|
||
[options="header", width="90%", cols="1,1,3"] | ||
|=== | ||
|Apache Hop|Java data type|Description | ||
|BigNumber|BigDecimal|An arbitrary unlimited precision number. | ||
|Binary|Byte[]|An array of bytes that contain any type of binary data. | ||
|Boolean|Boolean|A boolean value true or false. | ||
|Date|Date|A date-time value with millisecond precision. | ||
|Integer|Long|A signed long 64-bit integer. | ||
|Internet|Address|InetAddress An Internet Protocol (IP) address. | ||
|Number|Double|A double precision floating point value. | ||
|String|String|A variable unlimited length text encoded in UTF-8 (Unicode). | ||
|Timestamp|Timestamp|Allows the specification of fractional seconds to a precision of nanoseconds. | ||
|=== | ||
|
||
NOTE: Apache Hop also comes with a number of additional complex data types (e.g. Avro, JSON, Graph) that have no one-on-one mapping to Java data types. These data types only work with specific transforms and can't be used in general-purpose transforms. |