FastField's integration with Cosmos DB allows you to seamlessly send submission data to your Cosmos DB database. This integration simplifies the process of storing and managing your data in Cosmos DB. To set up this integration, follow the step-by-step guide below.
In this article
- How to Set Up the Cosmos Integration
- Frequently Asked Questions
How to Set Up the Cosmos Integration
- Go to Workflow > Global Workflow in the Portal and select + New Workflow to create a workflow.
- Under Perform these actions, choose Send to Cosmos.
- Set up the integration with the following parameters:
- Name: Assign a descriptive name to your integration for easy identification.
- Account Endpoint: Provide the endpoint URL for your Cosmos DB account.
-
Authentication Method: Choose one of the following authentication methods:
-
Role-Based Access Control (RBAC):
- Tenant ID: Enter the Tenant ID associated with your Cosmos DB account.
- Application ID: Provide the Application ID associated with your Cosmos DB application.
- Application Secret: Enter the Application Secret associated with your Cosmos DB application.
- Note: This authentication is the most secure.
-
Primary/Secondary Key:
- Primary/Secondary Key Value: Provide the Primary or Secondary Key associated with your Cosmos DB account.
-
Role-Based Access Control (RBAC):
- Database and Container Setup: Ensure that your database and container already exist within your Cosmos DB account. These must be created before configuring the integration for it to work correctly.
-
Configure Partition Keys: For ideal partitioning and efficient data retrieval, use the following hierarchy for partition keys:
-
Partition Key Hierarchy: For ideal partitioning use
accountId/userId/id- Partition keys are essential for organizing your data within Cosmos DB effectively. By adopting this hierarchy, you can optimize data storage and retrieval based on account, user, and unique identifiers.
-
Partition Key Hierarchy: For ideal partitioning use
- Save your settings.
Note: Please ensure that your Cosmos DB database and container are already set up and that you have the necessary permissions and access rights to perform write operations.
Frequently Asked Questions
Q: Can I use multiple Cosmos DB containers with a single integration?
A: Yes, you can configure the integration to send submission data to different containers within the same Cosmos DB database. Each integration can be set up to target a specific container.
Q: Is there a limit to the number of partitions I can create within Cosmos DB?
A: Cosmos DB offers a high degree of scalability, and you can create a significant number of partitions based on your data requirements. However, it's essential to design your partitioning strategy carefully to optimize data access.
Q: Can I change the partition key hierarchy after setting up the integration?
A: Changing the partition key hierarchy after integration setup may require adjustments to your Cosmos DB database structure. It's recommended to design your partitioning strategy correctly from the beginning to avoid potential data migration challenges.