{"id":9185,"date":"2022-07-21T13:57:34","date_gmt":"2022-07-21T18:57:34","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=9185"},"modified":"2022-07-22T14:38:03","modified_gmt":"2022-07-22T19:38:03","slug":"vega-visualization-when-data-element-name-contains-at-symbol","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=9185","title":{"rendered":"Vega Visualization when Data Element Name Contains At Symbol"},"content":{"rendered":"<p>We have data created by an external source (i.e. I cannot just change the names used so it works) &#8212; the datetime field is named @timestamp and I had an awful time figuring out out how to address that element within a transformation expression.<\/p>\n<p>Just to make sure I wasn\u2019t doing something silly, I created a copy of the data element named without the at symbol. Voila \u2013 transformedtimestamp is populated with a datetime element.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1241\" height=\"386\" class=\"wp-image-9186\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/this-works-fine-if-the-data-element-is-named-time.png\" alt=\"This works fine if the data element is named 'timestamp'\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/this-works-fine-if-the-data-element-is-named-time.png 1241w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/this-works-fine-if-the-data-element-is-named-time-300x93.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/this-works-fine-if-the-data-element-is-named-time-1024x319.png 1024w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/this-works-fine-if-the-data-element-is-named-time-768x239.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/this-works-fine-if-the-data-element-is-named-time-750x233.png 750w\" sizes=\"auto, (max-width: 1241px) 100vw, 1241px\" \/><\/p>\n<p>I finally figured it out \u2013 it appears that I have encountered a JavaScript limitation. Instead of using the dot-notation to access the element, the array subscript method works \u2013 not datum.@timestamp in any iteration or with any combination of escapes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1171\" height=\"213\" class=\"wp-image-9187\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/enter-image-description-here.png\" alt=\"enter image description here\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/enter-image-description-here.png 1171w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/enter-image-description-here-300x55.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/enter-image-description-here-1024x186.png 1024w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/enter-image-description-here-768x140.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2022\/07\/enter-image-description-here-750x136.png 750w\" sizes=\"auto, (max-width: 1171px) 100vw, 1171px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have data created by an external source (i.e. I cannot just change the names used so it works) &#8212; the datetime field is named @timestamp and I had an awful time figuring out out how to address that element within a transformation expression. Just to make sure I wasn\u2019t doing something silly, I created &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1588],"tags":[931,1589,1591,1669],"class_list":["post-9185","post","type-post","status-publish","format-standard","hentry","category-elk","tag-data-visualization","tag-elk","tag-kibana","tag-vega"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9185"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9185\/revisions"}],"predecessor-version":[{"id":9190,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9185\/revisions\/9190"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}