![]() Using this URL, we will get the weather forecast from London(?q=london) for the next 10 days(&cnt=10) as XML and in metric units(&mode=xml). We can easily test the URL by simply copying the string into a browser's address line and pressing enter. The API produces weather data and we will use the URL to get the XML content. ![]() In the sample case, we have a very simple REST API which can be accessed via URL. If you want to retrieve data from a web service, you might want to read the section Communicating with Web Services first. For the sake of brevity, this guide is based on a web service data source that delivers XML content and we omit the file data source. The first step is to get the raw data from your source. Using the Query Builder to Import XML Data (Same Works with JSON) Getting the Raw Data (Source Pane) We can fiddle with the data types of the output columns in the column pane (top right) and we get a data preview of the resulting table in the preview pane (bottom). There is a pane displaying the structure of the type of element that we have selected (top left) and it can be used in an easy way to define which attributes or sub-elements we want to display in the output. Just as a quick outlook, this is the second dialogue: The right-hand side of this pane allows you, after you selected your main element, to see what elements would produce rows when the data is loaded.Īfter the first dialogue, we will later see another one where the output columns can be specified along with their respective data types. This helps you to determine which (recurring) element you want to have. The Raw configuration tab shows you the structure that Data Virtuality Studio automatically detected in the data in form of a tree view. You can use this tab to see what you need to specify as root element later. No columns, just many lines of XML or JSON code. You will see all the details as if the data was presented to you in a simple text file. You can use the tab labelled Source data preview to check what the actual data looks like. This pane contains two tabs that help you get the query builder to do as you wish. The rest of this pane relies on selecting an encoding. Note, however, that you must have a data source of type Web service in order to get data from one.Īfter selecting the correct data source, you can click on the folder icon and select a file from the opening dialogue. As this is out of scope for here, please refer to the section Communicating with Web Services in order to see how to set up correctly the parameters for Web Service access. Select the Web service tab and get your data from a REST API which allows you to retrieve data via URL and maybe some additional parameters.In order to use this, you must have a data source of type File connected and the appropriate right to read files in this directory. Select the File source tab and get your data from an accessible file which lies in your file system. ![]() This one is equal to the one you will find in the CSV query builder. The most important part of the builder is the source pane. Before, however, here is what the full query builder looks like: The builder consists of a number of panes and they shall be briefly described here. In the SQL editor tab, just click on the down arrow in the icon bar and select the entry Open XML/JSON query builder. ![]() The query builder's generated statement will show up in this tab once you are done. The query builder can easily be started from any SQL tab. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |