What is the default encoding that ML uses for xdmp:quote().
There is a daily job that loads hadoop ( Cloudera Dist ) with the files
that we have in ML using mlcp. Now we want to compare if both of them are
in Sync, so we are using md5 hash for validation. Initially we provided
Hadoop with our Hash and they came back saying that it didn't match with
their data. After doing some analysis we figured out that we should
explicitly specify the encoding as UTF-8 option in xdmp:quote as Java
Program on their end is doing the same.
(: The Hash that didnot match :)
xquery version "1.0-ml";
xdmp:md5(xdmp:quote(fn:doc("/sample.xml") )
In other words what would be the default encoding xdmp:quote uses ( My
assumpotion is that by Default ML saves Data as UTF-8 encoding is no
encoding is specified and while it retrieves the documents the same would
be used. )
(: the Hash that Match :)
xquery version "1.0-ml";
xdmp:md5(xdmp:quote(fn:doc("/sample.xml"),<options xmlns="xdmp:quote">
<output-encoding>utf-8</output-encoding>
<omit-xml-declaration>yes</omit-xml-declaration>
</options>))
Any insight is very much appreciated.
There is a daily job that loads hadoop ( Cloudera Dist ) with the files
that we have in ML using mlcp. Now we want to compare if both of them are
in Sync, so we are using md5 hash for validation. Initially we provided
Hadoop with our Hash and they came back saying that it didn't match with
their data. After doing some analysis we figured out that we should
explicitly specify the encoding as UTF-8 option in xdmp:quote as Java
Program on their end is doing the same.
(: The Hash that didnot match :)
xquery version "1.0-ml";
xdmp:md5(xdmp:quote(fn:doc("/sample.xml") )
In other words what would be the default encoding xdmp:quote uses ( My
assumpotion is that by Default ML saves Data as UTF-8 encoding is no
encoding is specified and while it retrieves the documents the same would
be used. )
(: the Hash that Match :)
xquery version "1.0-ml";
xdmp:md5(xdmp:quote(fn:doc("/sample.xml"),<options xmlns="xdmp:quote">
<output-encoding>utf-8</output-encoding>
<omit-xml-declaration>yes</omit-xml-declaration>
</options>))
Any insight is very much appreciated.