Moped Documentation
  • Welcome 👋
  • User Guides
    • Getting started
    • Map a project
  • Product Management
    • User communication
    • User management
    • User analytics
    • Local testing
    • Release process
    • Patch release process
    • MUI X Pro License
    • Integrations
      • Dataset documentation
      • ArcGIS Online
      • eCapris
      • Power BI
    • Features
  • Dev Guides
    • DB Docs & Data dictionary
    • Database backup policy
    • Moped Read Replica
    • How-to's
      • How do I start the Hasura cluster locally?
      • How do I launch the Hasura Console?
      • How do I get a JWT token?
      • How to ping the GraphQL API
      • How to ping the REST API
      • How do I connect a database with Postgres GUIs?
      • How do I connect to the RDS instance?
      • How to load production data into a local instance
      • How do I update seed data?
    • Hasura
      • Hasura Roles
      • Hasura Migrations
        • Getting Started
        • Installing the Hasura CLI
        • Configuration Files
        • Hasura Migration Principles
        • The Migration file format
        • Development
        • Hasura Seed Data
        • Running the Hasura Cluster Locally (video)
        • Create a migration: Exercise 1 (video)
        • Create a migration: Exercise 2 (video)
        • Latest hasura-cluster features
    • User Management
    • Authentication
      • Authentication Architecture
      • DynamoDB & Cognito
      • Secrets Manager & Cognito
      • Hasura & Cognito
      • React & Cognito
      • Flask API & Cognito
      • Single Sign-On with CTM
    • Code organization
    • API
      • Configuration Files
      • Testing
      • User Management API
    • Maps and geospatial data
      • Access tokens and API keys
      • Map libraries
      • Map data
      • Map styles
      • Map layers and basemaps
      • React patterns
      • V1 Archive
        • Map libraries
        • Map data
        • Map custom hooks
        • Map styles
        • Map layers and basemaps
    • UI access control
    • Design system
      • Branding
      • Component styles
      • Text content
    • Activity Log
      • Architecture
      • GitHub Actions and Deployment of Updates
      • Hasura Event Logs and Truncate Cron Job
      • Authentication
  • See also
  • Get Moped support, report a bug, or request an enhancement
  • Data & Technology Services
  • Github repository
Powered by GitBook
On this page
  • Updating the ArcGIS Online Components Database View
  • Summary
  • Code updates
  • Adding a new field
  • Renaming an existing field
  • Removing an existing field
  • Links
  • ArcGIS Online Feature Service settings
  • Updating settings
  • Links

Was this helpful?

  1. Product Management
  2. Integrations

ArcGIS Online

PreviousDataset documentationNexteCapris

Last updated 3 months ago

Was this helpful?

Updating the ArcGIS Online Components Database View

Summary

We have an ETL () that uses the component_arcgis_online_view Moped database view to push data about project components to an AGOL feature service with point, line, and combined_geometry layers (). This describes the workflow of adding, updating, or removing fields in this service and the coordination it takes with the DTS Geospatial team.

There are two downstream dependencies of this database view that can break:

  • (coordinate with the Geospatial team; see below)

  • (coordinate with the Data Science team; see below)

Code updates

The database view and ETL GraphQL query must be updated with the new or updated field names.

Here is an example pull request: .

Adding a new field

  • Stage code changes for new field

  • Submit a for the GIS team to add new field

  • Release or patch to introduce new field into ETL

  • Tell the Data Science team about this update so they can

Renaming an existing field

  • Stage code change for field rename

  • Release or patch to introduce new field into ETL

  • Request GIS team remove the old field name now that it is unused

Removing an existing field

  • Stage code change for field removal

  • Release or patch to remove column from ETL

  • The ETL will not break with the changes up to this point. The next step can be performed anytime after removing the fields from the code to clean up the AGOL dataset.

Links

ArcGIS Online Feature Service settings

Before making any changes to a feature service, check with the Geo team and let them know what we are trying to accomplish.

Updating settings

Once a token is retrieved and place in the URL, the UI can be used to make a POST request through the form with new configuration in JSON format placed in the input labeled Update Service Definition.

To update the sanitization config, the following JSON was used.

Original configuration shown in the Update Definition input

{
  ...the rest of the config,
  "xssPreventionInfo" : {
    "xssPreventionEnabled" : true, 
    "xssPreventionRule" : "InputOnly", 
    "xssInputRule" : "rejectInvalid"
  },
  ...and a bunch more config
}

Updated configuration sent in input

{
  "xssPreventionInfo" : {
    "xssPreventionEnabled" : true, 
    "xssPreventionRule" : "InputOnly", 
    "xssInputRule" : "sanitizeInvalid"
  }
}

Once you press the Update Definition button to send the payload, you will see a success message or an error if the JSON is invalid.

Links

Submit a for the GIS team to add new column name. We keep the old column name to keep the ETL compatible and working with both the new and old field names

Tell the Data Science team about this update so they can

Submit a for the GIS team to remove the field

Tell the Data Science team about this update so they can

Settings on the feature service level (the AGOL side) can be updated using the Admin Service Catalog endpoint described . The only setting that we have changed so far is the xssPreventionInfo setting to place the responsibility of sanitizing invalid HTML on the AGOL side.

To update this setting, go to .

You will need to fetch a token using the same mechanism we use in our . Using an API development tool like Postman or Insomnia can be helpful for this, and it will require the same secrets used in the code.

To update configuration, you should include only the configuration that you are trying to update. Including unneeded configuration will produce errors. See this for more context.

code
feature service endpoint
AGOL Feature Service
PowerBI dataflow
https://github.com/cityofaustin/atd-moped/pull/1357
service request
update the PowerBI dataflow
service request
update the PowerBI dataflow
service request
update the PowerBI dataflow
Example service request
here
https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/admin/services/Moped_Project_Components/FeatureServer/updateDefinition?token=
Moped <> AGOL ETL code
esri post
https://github.com/cityofaustin/atd-data-tech/issues/20842
https://github.com/cityofaustin/atd-data-tech/issues/20801
https://community.esri.com/t5/arcgis-online-questions/how-to-use-the-update-definition-operation-on-a/m-p/1483647/highlight/true#M59511