Gluesync NoSQL to SQL
Customizing date types
By default every incoming date field value captured by Gluesync’s Engine is pushed to the target datastore converted in ISO-8601 format.
Gluesync could optionally be told to convert those in another different format based on the use-case by issuing the following config in the configuration file:
{
...
"convertDateAs": "CUSTOM_FORMAT",
"dateFormat": "yyyy-MM-dd HH:mm"
...
}
Where:
-
convertDateAs: is the function that tells the Engine how it should handle incoming date types, it supports the following parameters:
-
UNIX_TIMESTAMP
: dates are converted into UNIX TIMESTAMP and the data type will be LONG (ex.1684741562
); -
ISO_8601
: dates are converted into the ISO-8601 standard format and the data type will be STRING (ex.2023-05-22T07:37Z
); -
CUSTOM_FORMAT
: dates are converted into the specified format issued when defining dateFormat key.
-
-
dateFormat (optional): string representing the date format you’d like to get from the sourced date value, to be used when
CUSTOM_FORMAT
is set as a convertDateAs value;