Sources with the BigML Dashboard

8.5 OData

Remote sources can specify an OData URI as its source, accessible either by HTTP or HTTPS, by using the odata or odatas scheme. For instance, the URI in Figure 8.8 will request BigML to access the table Customers in the OData root http://services.odata.org/Northwind/Northwind.svc.

odata://services.odata.org/Northwind/Northwind.svc/Customers
Figure 8.8 Example of an Odata remote source

You can use any OData URL parameter to construct the result set (BigML will just use the given URL as is, specifying to the OData service that it wants its result in JSON format), as long as the answer to the query contains a list of results (i.e., an entity set, or OData “table” or “view”). To select only the first 100 rows of the above source, and only the City and PostalColumns you could write:

odata://services.odata.org/Northwind/Northwind.svc/Customers?$top=100&$select=City,PostalColumns
Figure 8.9 Example of an Odata remote source with parameters

BigML also accepts the abbreviations od:// and ods:// for odata:// and odatas://, respectively.

Only columns with atomic (number, string, boolean) values are imported by BigML. For any inner field in a composite value to be part of the source, just construct the appropriate query with the URL parameters.

For more information about OData URIs, see OData URI conventions.

As a special case, BigML recognizes Azure Marketplace HTTPS URLs with hostname api.datamarket.azure.com as OData stores. Create a remote source using the URL displayed in Figure 8.10 , and it will be treated as if it were the canonical form shown in Figure 8.11 .

https://api.datamarket.azure.com/www.bcn.cat/BarcelonaFacilities/v1/EquipamentsBCNRefreshed
Figure 8.10 Example of Azure Data Market remote source using HTTPS
odatas://api.datamarket.azure.com/www.bcn.cat/BarcelonaFacilities/v1/EquipamentsBCNRefreshed
Figure 8.11 Example of Azure Data Market remote source using odatas

BigML provides support for Azure Data Market entities protected by an account id and account key, which must be provided as the query string parameters AccountId and AccountKey, as shown in Figure 8.12 .

ods://api.datamarket.azure.com/Data/v1/E?AccountId=adfsf&AccountKey=edj/2+
Figure 8.12 Example of a protected Azure Data Market Remote Source

As always, you can also use odata or https for the schema.