faq-about-data-source-management
Learn about common data source connection issues in DataV and how to resolve them.
DataV tutorial video:Data source management-FAQ.
CSV data source issues
How do I configure a CSV data source for a widget?
Log on to the DataV console, choose My Data > Data Source Management, and select + Add Data. In the Add Data dialog box, select CSV File and enter Custom Data Source Name. Then, upload a CSV file from your computer. After the file is uploaded, you can add a widget in Canvas Editor. In the Set Data Source section of the Data panel on the right, select CSV File and configure the widget. After the configuration is successful, the widget is displayed as a static data chart.
The size of the added CSV file cannot exceed 512KB.
API-like issues
How do I configure an API data source?
Add a widget in Canvas Editor. In the Data panel on the right, click Set Data Source and select the API to configure the widget.
-
API data sources support two request methods: get and post.
-
You do not need to add an API data source. You can find the API data source in the Set Data Source section of the Data panel in Canvas Editor.
What do I do if I encounter the cross-domain problem when I use an API data source in DataV?
Cross-Origin Resource Sharing (CORS) is an HTTP header-based mechanism that allows a server to indicate origins (protocol, port, and host) other than its own from which a browser can load resources. For simple requests, the browser sends the CORS request directly. For non-simple requests, the browser first sends a preflight OPTIONS request to check whether the target server allows the cross-origin request. If allowed, the browser then sends the actual HTTP request. If cross-origin issues prevent data from loading, use one of the following solutions:
-
Method 1: When configuring the data source, select Server Proxy Request.
NoteThis method requires that your API is accessible over the Internet and responds within 10 seconds, which is the timeout limit for server proxy requests.
-
Method 2: Add the
Access-Control-Allow-Originfield to the response header of the data server.NoteIf the API data needs to be used by all websites, you can use the wildcard
*.
Database problems
How do I configure a database data source?
In the DataV console, choose My Data > Data Source Management, and click + Add Data. In the Add Data dialog box, configure the database and click OK.
-
DataV supports user-created databases.
-
If you connect to a database through the DataV server, the query timeout is 10 seconds. The database must be accessible over the Internet, and you must add DataV to the database whitelist.
If your database is not accessible over the Internet, you can use the DataV Proxy Service. This service is designed for internal databases and SQL queries that exceed the 10-second timeout limit. For more information about how to obtain a proxy, see How to use DataV Proxy.
-
When you use the DataV Proxy Service, the DataV data source connects to the proxy instead of the database directly. The computer that accesses the visualization application must be able to reach the proxy service to load data.
-
The DataV Proxy Service uses HTTP by default. When you configure a connection or access a visualization application, you must open the DataV page over HTTP.
Practical demonstration
How do I configure a CSV data source for a widget?
To migrate another VMware VM, perform the following steps:
-
In the DataV console, choose My Data > Data Source Management, and click + Add Data.
-
In the Add Data dialog box, set Type to CSV File, enter a custom data source name, and then upload a CSV file.
NoteThe size of the CSV file cannot exceed 512KB.
-
After the CSV file is uploaded, you can add a widget in Canvas Editor. For example, in the line chart widget, select the widget. In the Set Data Source section of the Data panel on the right side of the widget, click Data Source Type and select the configured CSV file. In the Select Existing Data Source section, select CSV for configuration.
Notex-axis, set Data Type to Category in the Configuration panel.
How do I configure an API data source?
You can add a widget in Canvas Editor. For example, the TicketCard Maker widget is used. In the Data panel on the right side of the widget, click Set Data Source. Then, click Data Source Type and select API.
If an error occurs, choose More Tools > Developer Tools in the upper-right corner of the browser and check the Console for cross-origin error messages. Then, add the Access-Control-Allow-Origin field to the response header of the data server to resolve the issue.
How do I configure a database data source?
-
In the DataV console, choose My Data > Data Source Management, and click + Add Data.
-
In the Add Data dialog box, set Type, RDS for MySQL, Internet, Name, Domain Name, Port, Username, and Database, and then click OK.
-
After the component is created, add a component in Canvas Editor. In the Set Data Source section of the Data panel on the right side of the component, click Data Source Type and select the configured database data source.
NoteIf you cannot access the Internet or do not want to access the Internet, perform the following steps:
-
In the DataV console, choose My Data > Data Source Management, and click + Add Data.
-
In the Add Data dialog box, set Type and DataV Proxy Service. Domain Name is the domain name of the data proxy service and Port is also the port of the data proxy service. To key and Secret, copy and paste the key of the data proxy service.
-
After the configuration is complete, click Get Data List. When you configure the connection or access the visualization application, you must use HTTP to open the DataV page.
-
In Canvas Editor, select a component. In the Set Data Source section of the Data panel, click Data Source Type and select Database. The data source is proxy.
-