Skip to main content
Skip table of contents

Document database field conversion options

The MongoDB, Cosmos DB, and Document tools interpret input field data for one of two reasons:

  • For use as keys in queries

  • As data to be added to documents

In both cases, ambiguities must be resolved for certain data types, because document databases support data options that Data Management does not, and vice-versa. For tools that convert field data, the available options are described in this topic.

Include nulls in document

For tools that add values to documents, select this option to add explicit null values to the documents. Leave it cleared to omit these.

Convert DateTime fields

Data Management DateTime values are timezone free, meaningful only when interpreted in the context of an implied timezone. However, the MongoDB $date type is a traditional "timestamp" expressed as "milliseconds since epoch date in UTC timezone." When interpreting field values from upstream connections of type DateTime, you can specify how these fields are converted to document values.

Value

Description

String,Local

Default. Convert the DateTime value to a string formatted using the format yyyy-MM-dd'T'HH:mm:ss.SSS. Formats the DateTime value in the local timezone and does not include timezone offset in string.

String,Local,+TZ

Convert the DateTime value to a string formatted using the ISO-8601 standard format yyyy-MM-dd'T'HH:mm:ss.SSSZ. Interprets the DateTime value relative to the local timezone and includes timezone offset in string.

String.UTC

Convert the DateTime value to a string formatted using the format yyyy-MM-dd'T'HH:mm:ss.SSS. Interprets the DateTime value as UTC and does not include the timezone offset in string.

Date,Local

Convert the DateTime value to a MongoDB $date type. Interprets the DateTime value relative to the local timezone before converting to UTC timestamp.

Date,UTC

Convert the DateTime value to a MongoDB $date type. Interprets the DateTime value as UTC.

Convert Date fields

Data Management Date values are timezone free and do not have a time part. However, the MongoDB $date type is a traditional "timestamp" expressed as "milliseconds since epoch date in UTC timezone." When interpreting field values from upstream connections of type Date, you can specify how these fields are converted to document values.

Value

Description

String

Default. Convert the Date value to a string formatted using the ISO-8601 standard format yyyy-MM-dd. No timezone interpretation is needed, as this string is still a "timezone free" value.

Date,Local

Convert the Date value to an equivalent DateTime value by adding midnight as the time part. Convert the resulting DateTime value to a MongoDB $date type. Interprets the DateTime value relative to the local timezone before converting to UTC timestamp.

Date,UTC

Convert the Date value to an equivalent DateTime value by adding midnight as the time part. Convert the resulting DateTime value to a MongoDB $date type. Interprets the DateTime value as UTC.

Convert Decimal fields

Data Management Decimal values are fixed-point decimals. MongoDB supports a much richer Decimal128 type, but CosmosDB does not. Data Management offers the following options to make the conversion more portable if you do not want to use the Decimal128 type. These may also be useful if you are converting to JSON and do not want the extra document level and $numberDecimal type tag.

Value

Description

Decimal128

Default. Convert the value to a Decimal128.

Double

Convert the decimal to a Double value, which is supported by CosmosDB and JSON. May lose precision and induce rounding errors. Not recommended for currency values.

String

Convert the decimal to String format, which is supported by CosmosDB and JSON. Does not lose precision, but cannot be processed as a number in the database (collation, relational operators, and aggregation will not work on string types).

Convert binary _id fields

If this option is selected, Data Management will interpret input binary fields named _id as MongoDB's ObjectId. This is usually correct and is the default behavior.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.