Create a Dataset
Before creating a dataset, make sure you have completed the following steps:
* 
The CreateDataset service cannot accept the AnalyticsDatasetMetadata infotable that is output from the DetectMetadata service. Metadata for CreateDataset must be provided in JSON format.
The process for creating and optimizing a dataset is handled by one service on the DataThing.
1. In ThingWorx Composer, navigate to the Things page.
2. Find the DataThing in the list of Things and click to open it. The General Information page is displayed.
* 
The DataThing name will be prefixed with the server name you assigned during the ThingWorx Analytics Server installation process.
3. Using the drop down menu at the top of the screen, navigate to the Services page.
4. In the Inherited Services table, click CreateDataset to open the service.
5. Supply the following inputs:
Input Field
Description
csvURI
Enter the location and name of a CSV data file that was uploaded to the AnalyticsUploadStorage Thing. For information about uploading data and metadata files, see Upload the Data.
Example:
thingworx://AnalyticsUploadStorage/<file path/name>.csv
csvHasHeaders
If the CSV data file includes a header row, select True. Otherwise, select False.
metadataFileURI
Enter the location and name of the JSON metadata file that was uploaded to the AnalyticsUploadStorage Thing. For information about uploading data and metadata files, see Upload the Data.
thingworx://AnalyticsUploadStorage/<file path/name>.json
* 
Save Input Set – If you plan to re-use the input information for a given service, you can use a saved input set as a shortcut to populate the input fields. To use this feature, click Save Input Set, enter a name for the saved set of values, and click Save Input Set. The next time you need to execute the service with the same inputs, click the arrow in the Select input set field at the top of the Inputs panel and select the saved input set.
6. Click Execute. The new dataset is created and a Job ID for the results is returned.
7. To obtain the dataset URI for use in other services:
Copy the jobId.
Close the CreateDataset service page.
Navigate to the GetJobInfo service and click to open it.
Paste the copied ID into the jobId field and click Execute. Job information details are displayed in the Output panel.
Scroll across to the datasetRef column and click the infotable icon. The datasetUri and format are displayed in the Output panel.
* 
Steps to find a list of the files that have been uploaded to the AnalyticsUploadStorage Thing:
On the Things page, find and open the AnalyticsUploadStorage Thing. If it is not listed, click the Filter Options icon at the top of the page and select Show System Objects.
When the AnalyticsUploadStorage General Information
page opens, use the drop down field at the top to navigate to the Services page.
In the Inherited Services table find and open the GetFileListingWithLinks service.
In the Inputs panel, click Execute. A list of the files currently available in the AnalyticsUploadStorage Thing will be listed in the Output panel.
Was this helpful?