Read from feature services
Feature services are data sources that are hosted online. This tutorial shows how to read from and manage feature service datasets. You can create Spark DataFrames from feature service data sources and use them with any operations supported on a DataFrame. Writing to feature services is not supported.
In this tutorial you will learn how to access public and protected feature services. You will create DataFrames from feature services and perform basic queries.
Steps
Read from a public feature service
Read a public feature service into a DataFrame and query for countries where the average population of the listed cities are greater than 50,000.
Read a feature service containing major USA cities and create a DataFrame.
PythonUse dark colors for code blocks Copy Group the DataFrame by country and find the average population per country.
PythonUse dark colors for code blocks Copy Query for countries where the average population of major cities is greater than 50,000.
PythonUse dark colors for code blocks Copy ResultUse dark colors for code blocks Copy
Read from a protected feature service
Feature services that are protected can be read by passing a token.
- Read a service in with an example token. The URL and token below are for example only and will need
to be updated to reflect your feature service URL and a valid token
from your organization.Python
Use dark colors for code blocks Copy
What's next?
Learn about how to read in other data types or analyze your data through SQL functions and analysis tools: