Configure the First Function
The following, we describe the first steps in order to get data into an application, in this example we focus on Microsoft Excel. Therefore, we need a Source System where the data is located and a Function which defines the kind of retrival. In this example, the Function should enable you to download the German gross domestic product (GDP) from the Bundesbank data base, which is publically available.
Create a System Line and a System
First of all, we have to define the source of the data. In VDP this is done by a System Line and a System. Both components can be created and configured in the VDP Portal in the left sidebar menu under 'System Lines'.
A new System Line requires an installed and running Agent. So make sure that you have already created one.
The menu will provide a list of all already configured System Lines. In order to create a new one, click on the button 'New System Line' on the top left. The following window will appear:
As shown in the screenshot, you have to enter the following information:
- Kind: Web
- Authentication: Disabled
- Short Name: PublicInternet, or feel free to enter another name
After saving a new box with systems will appear on the right side. Click on the button 'New System' to create a new System. The following window will pop up:
Enter the following information:
- Short Name: Bundesbank
- Location: Here you have to select the Location and the Agent you have created before.
The screenshot above indicates 'no Agent available'. So in order to be able to load data, the Agent should be running
All other information can be ignored. Save the inputs to be able to 'Enable' the System. Check 'Enabled' and save once more.
Every system line requires a default system. This can be set by clicking on the following button.
Now the system line 'PublicInternet' will appear in the System Line overview, including the system Bundesbank.
Create a Category
Each Function has to be grouped into a Category. Therefore, we have to create a new Category before adding the new Function. This is done in the menu 'Virtual Dataset'. Details about Virtual Datasets can be found in the section fundamental concepts. After opening the menu, a new Category can be created on the upper left:
A new window pops up where you have to enter the following
- Workspace: Public
- Short Name: WEB
- Color: Select an arbitrary color or one which is in line with department or company
After saving, the new category is available.
Create and Test a Function
Now we can create our first Function. Go to the menu 'Virtual Datasets' again. There you will find the recently created category "WEB". Click on the '+' sign and on 'New Function'. A new window appears where you can specify the function as follows:
- Workspace: Public
- Category: WEB
- Short Name: GDP
- System Line: PublicInternet
- System: Always default
- Techical Handler(/fundamental-concepts/query-handler/#defQueryHandler): CSV - Version X.X.XXX (latest)
- Caching: Not cached
- State: Preview
Click on 'Create' in order to create the Function. Another box appears, where the technical parameters have to be entered. For our GDP example, the parameters have to be configured as follows:
The GDP data from the Bundesbank is downloaded via this url. Do not forget to enable the function by checking the 'Enabled' function configuration above the window of the technical parameters. After saving you can try out the function in the Test Bench:
After clicking on the button 'Execute Query', Virtual Data Platform retrieves the data from the Source System. The GDP example does not require any other Parameter settings, since it only loads the plain CSV-file from the Bundesbank. After finishing, the results are shown below in the 'Results' window:
The results in the screenshot show two columns "DATE" and "VALUE" as well as that the query took about 0.34 seconds to be executed.