I want to create a web tile for Microsoft Band to display JSON data received from a web service. However the service returns data in very raw format, is it possible to format them before they are displayed on the Band? Or the only options is to display the data as it is returned by the service?
For example timestamps are returned as Numbers which I want to convert to human readable dates and times; or to concatenate strings from multiple JSON property.
Thank you.
György
Conversion of data is not possible. If you need to process the JSON then you need to build that into your endpoint's JSON data (or create an endpoint that handles the conversion).
Related
I want to load a CSV file into DynamoDB but I can't find a way to specify the type for each column of my file.
Take the following data from my CSV file:
"discarded","query","uuid","range_key"
false,"How can I help you?","h094dfd9e-a604-4187-99ff--mmxk","log#en#MISMATCH#2021-04-30T12:00:00.000Z"
The discarded column should be considered as a BOOL but DynamoDB imports it as a String.
Is there any way I can specify a type before importing the CSV or should I process the data with a script to handles the conversions myself?
AWS does not currently provide any tools to simplify this kind of operation rather than the REST API.
However, Dynobase, a third-party application developed to easily manage DynamoDB, allows you to import/export data in CSV and JSON formats.
The import tool allows you to select the type of data before insertion.
In CRM I have a 'Doc_Config' value.
The 'Doc_Config' value gets passed to Power Automate Flow
With the data I populate an Microsoft Word Document. My problem here is, that instead of the data the raw text is filled into the Word Document.
Is there a way to convert the raw text so Power Automate recognizes the data I actually want? Like as if it is presented to the Flow like so:
Problem: You probably have copied the path for your objects and pasted the path value in your 'Doc_Config' value. Here the problems should be with the #{...} pattern.
Solution: Please, remove #{...} pattern from any objects that you are referring to by their path as in the example below:
incorrect:
#{items('Apply_to_each_2')?['productname']}
correct:
items('Apply_to_each_2')?['productname']
Background:
In Power Automate cloud flows, you reference objects that the dynamic content tooling offers. However, sometimes you want to catch objects that the dynamic content tooling cannot see, or does not provide. At these times, you can refer to them by specifying the path for them as in the example below.
items('Apply_to_each_2')?['productname']
You can observe the path for the objects by hovering over any object that the dynamic content tooling is providing you.
Another option would be to simply parse the data from your array, as it is already JSON.
I will add three links here to Imgur images as I can't post images directly yet, but the idea is very simple:
Append your data to your array variable
Add a Parse JSON task, click generate from sample, and paste in the JSON you use.
Your actions can be used in all other steps now.
The images will clarify a lot.
Append your data
Parse your data
Use your data
I have set up an IotHub that receives messages from a device. The Hub is getting the messages, and I am able to see the information reaching and being processed in TSI.
Metrics from TSI Azure
However, when trying to view the data in the TSI enviroment I get an error message saying there is no data.
I think the problem might have to do with setting up the model. I have created an hierarchy, types, and an instance.
model view - instance
As I understand it the instance fields are what is need to reference the set of data. In my case, the Json message being pushed thru the IOT HUb has a field called dvcid, in which "1" is the name of the only device sending values.
Am I doing something wrong?
How can i check the data being stored in TSI, like the rows and columns?
Is there an tutorial or example online where I can see the raw data going in and the model creation based on that data?
Thanks in advance
I also had a similar issue when I first tried using TSI. My problem was due to the timestamp I sent that was not in a proper format (the formatter sent things like "/Date(1547048015593+0100)/", which is not a typical way of encoding dates). When I specified the 'o' date to string format, it worked fine afterwards:
message.Timestamp = DateTime.UtcNow.ToString("o");
Hope this helps
f
According to this article, it's best to convert Date into Epoch time in order to use it is range query in DocumentDB. However, as recently the range query on Sting values has been added to DocumentDB, it is necessary to do convert date-time to epoch (as long as all date-time values have the same format and are in UTC format)?
This is similar to this question, where the accepted answer suggests using strings as you point out.
But to answer your question more specifically, DocumentDB cannot store JavaScript Date objects because it only stores pure JSON and Date is not a part of the JSON spec. So, you (or your client API) needs to do something with Date objects. By default, the node.js and .NET clients will convert Date objects to ISO-8601 formatted strings so using strings is actually a bit easier than Epoch. Just send the Date object to the database. The one trick to keep in mind here is that it's not converted back into a Date object when you read it. It comes back as a string. You have to do the conversion yourself. In JavaScript, this is easy. Just call new Date(yourDateString). Not sure about .NET or the other platforms.
I'm a newbie in Freebase Topic API. Currently I am looking for "How to retrieve specific set of data using Freebase Topic API?"
for e.g. if we request for particular information using following URL
https://www.googleapis.com/freebase/v1/topic/en/nicobar_scrubfowl?filter=/common/topic/description
we get ample of information like "id","property","values" array containing "text","lang","value" etc.. And I don't want all the information.
So how to retrieve particular set of information using topicAPI (like only "value" from "values" array OR only "provider" etc..)
thanks
If you want that level of control, you should investigate the MQLRead API.
There's no way to filter out those parts of the Topic API response. Every property value will have at least text, lang, id, creator and timestamp.
Why is this a problem in your application? As long as you're parsing this data with a JSON parser you will be able to access any of the data you want while ignoring the rest. If you're worried about the size of the response you can ask for a GZip response.