I am looking to connect Power BI to Google Firebase.
I've followed the below steps,
Get Data > Blank Query
Entered the below Query
let
Source = Json.Document(Web.Contents("url to firebase database")),
#"Converted to Table" = Record.ToTable(Source)
in
#"Converted to Table"
I've entered the url but it looks like its expecting a JSON output. How can I get a JSON output to include on Power BI to visualise data stored on Firebase?
For what I am looking in the error message in image, the problem in not connecting with Firebase, instead the problem is the query you are using, the variable source is getting the content of the page and that is why is giving you that error.
You can try this command that return the Json of the a collection with the values in it.
projects/{project_id}/databases/{databaseId}/documents/{document_path}/
The document path is the document that you want the information
And the databaseId if you don't know which is it, it is probably (default) you need to put the () in the url of the request
Here you can see how the Json is structured
Related
The values for data.CustomerNumber do not get written to the file, the other elements do.
The CustomerNumber is Pascal case because it is a custom value in the system I am pulling the data out of.
I have tried the map complex values option, advanced editor, deleted, started over. I originally was trying to save this to a Azure Sql table but gave up , and just tried to write to a file. I have been able to do this type of mapping in other pipelines so I am really at a loss for why it doesn't work in this case.
The actual json content for the mapping
It is possible to change value of the parameters in Power Bi Desktop from dashboard (main-page) level ?
I'm using parameters in two web requests as json body (DateFrom DateTo).
I know that there is "Transform data" option and I was trying :
https://learn.microsoft.com/en-gb/power-bi/connect-data/desktop-dynamic-m-query-parameters
but I cannot bind table to parameter - there is no "Bind to parameter" field.
Bind to parameter
My Api Request
You can only use query parameters in Power Query (M language). Here is an example that works for me. Assuming the output is JSON, you would do it like this (you do it in the advanced editor):
let
src = Web.Contents(baseUrl, [RelativePath = urlPath, Query=[#"api_token" = apiKey, limit=Text.From(limit), start=Text.From(offset)]])
json = Json.Document(src)
in
json
In the above examples, parameters are:
baseUrl for root API path
urlPath for API endpoint
apiKey for API authorization token
limi and offset for getting a subset of data
That's just an example, but the api_token parameter is crucial, if you want the query to refresh in the Power BI Service (assuming you're using token-based authentication).
EDIT:
So, I think I finally understood where your problem is. I don't think it can be done with REST API, as the requirement for the Bind parameter function to work is for the query to be in Direct Query mode as opposed to Import. And I don't think you can set it for this.
Very new to mule esb. I am trying to retrive json response from http request connector and then inserting it into db. Not sure why I am not able to fetch the values when I am inserting it into DB.
Getting the following error while inserting into database:
Execution of the expression
"message.payload.Data.MissingItems.Institution" failed.
(org.mule.api.expression.ExpressionRuntimeException).
My conf file
Put a debugger before foreach and inside foreach and see how the values are being stored inside the map.Run the application in debug mode and see the structure of the payload using mule expression language.You can find out the option inside the debugger.There you can put #[message.payload] or #[message.payload.Data] or #[message.payload.Data.MissingItems] to check the structure of the message.It will also help you to understand if the issue is related to transformation or anything else.
I'm very very new to this and need some help writing an ESB script to take an event posted via HTTPS on Port 9090 in WSO2 and transform it into a message to be apended to an XML file on the server:
The HTTPS data will contain : “ID=Servername|Severity=sevtype” (Where Servername is a device name and Sevtype can either be "WARNING" or "OK" depending on whether the server is down or up)
This then needs to be transformed and appended to an existing XML file in the following format:
<event>
<componentID>Servername</componentID>
<timestamp>2012-04-27 01:37:10</timestamp> ***(Date and time the event was received)***
<severity>NORMAL</severity> ***(If original is WARNING then severity = SEVERE else it = NORMAL)***
<eti>NodeStatus</eti><etivalue>Up</etivalue> ***(If original is WARNING then severity = Down else it = Up)***
<\event>
Please could someone assist me i'm really floundering with what seems to be a simple thing
Many Many Thanks
Simon
You can write a simple task to poll your data into the server and can do a xslt transformation to construct that particular xml format message.
Some references to write a task;
http://wso2.org/project/esb/java/4.0.3/docs/configuration_language.html#TaskConcept
http://docs.wso2.org/wiki/display/ESB403/Writing+Tasks
http://wso2.org/library/2900
How do you get the ID and Severity? are they http headers?
Generally you can use payload factory mediator[1] to build the payload messages with some input parameter data.
[1] http://wso2.org/project/esb/java/4.0.3/docs/samples/message_mediation_samples.html#Sample17
There is a web service that allows me to go to a URL, with my API-key, and request a page of data. The data is returned as JSON. The JSON is well-formed, I ran it through JSONLint and confirmed its OK.
What I would like to do is retrieve the JSON data from within MS Access (2003 or 2007), if possible, and build a table from that data (first time thru), then append/update the table on subsequent calls to that URL. I would settle for "pre-step" where I retrieve this information via another means. Since I have an API key in the URL, I do not want to do this server-side. I would like to keep it all within Access, run it on my PC at home (its for personal use anyway).
If I have to use another step before the database load then Javascript? But I dont know that very well. I dont even really know what JSON is other than what I have read in Wikipedia. The URL looks similar to:
http://www.SomeWebService.com/MyAPIKey?p=1&s=50
where: p = page number
s = records per page
Access DB is a JavaScript Lib for MS Access, quick page search says they play nicely with JSON, and you can input/output with. boo-ya.
http://www.accessdb.org/
EDIT:
dead url; wayback machine ftw:
http://web.archive.org/web/20131007143335/http://www.accessdb.org/
also sourceforge
http://sourceforge.net/projects/accessdb/