Unify and manage your data

Create a custom view for an entity type

Learn how to generate a Snowflake SQL view for a specific entity type using the Scripts API and execute it in your Snowflake account.

Prerequisites:

  • The Snowflake internal staging adapter is fully configured and enabled for your tenant.
  • The Secrets API authentication is complete and the RSA key is assigned.
  • You have access to your Snowflake environment with permission to create views.
  • The entity type you want to filter on must be defined in your Reltio data model.
  1. Send a POST request to the Scripts with your entity type

    Use the following endpoint to request the SQL for a custom entity view:

    
    POST {{hub-url}}/api/tenants/{{tenantID}}/adapters/{{adapterName}}/scripts?name=entities.views_all
              

    Example request body:

    
    {
      "entityType": "Individual"
    }
              

    This returns a SQL view for the specified entity type. Example response:

    
    CREATE OR REPLACE VIEW "entity_Individual" AS
    SELECT *
    FROM "entities"
    WHERE "type" = 'configuration/entityTypes/Individual'
    AND "active" = TRUE;
              
  2. Run the SQL script in your Snowflake account

    Execute the SQL in your Snowflake worksheet or through an orchestration tool. The view is created in the schema configured in your adapter settings.

    You can repeat this process for other entity types as needed by changing the entityType value.

The new view appear in your Snowflake account and contains only the records of the selected entity type. You can now use this view for analytics, reporting, or downstream processing.