Atlas Data Federation Configuration File
You can use an Atlas Data Federation configuration file to specify the required
settings for creating a federated database using the Atlas CLI. The
Atlas CLI accepts .json
Data Federation configuration files.
Use the following resources to:
Learn the required settings you can specify in the cluster configuration file.
View and copy sample configuration files.
Required Atlas Data Federation Settings
Atlas requires the following settings to create a federated database instance with the Atlas CLI. You must specify these federated database instance settings either in the configuration file or as flags in the command:
Field | Type | Description |
---|---|---|
| object | Cloud provider linked to this federated database instance. |
| string | Unique identifier of the role that the federated database instance can use to access the data stores.
Required if specifying |
| string | Name of the S3 data bucket that the provided role ID is authorized to access. Required if specifying |
| string | Name of the cloud service that hosts the federated database instance's data stores. For example, |
| string | Name of the region to which the federated database instance routes client connections. For the full list of available regions, see Cloud Providers and Regions. |
| string | Human-readable label that identifies the federated database instance. |
| string | Human-readable label that identifies the data store.
The |
| string | The type of data store. For example, |
For a full list of available settings, see the request body schema in the API specification: Create One Federated Database Instance in One Project.
Example Atlas Data Federation Configuration File
To create a federated database instance, specify the fields you want to update as shown in the following example file:
{ "cloudProviderConfig": { "aws": { "externalId": "2fe853d3-4b5b-4le0-9414-s3b6ab040ccb", "iamAssumedRoleARN": "arn:aws:iam::123456789012:root", "roleId": "MY_ROLE" } }, "dataProcessRegion": { "cloudProvider": "AWS", "region": "SYDNEY_AUS" }, "groupId": "32y6e74b3g91947azb20e3b8", "hostnames": [ "federateddatabaseinstance5-0ywks.a.query.myhost.com:37017" ], "name": "FederatedDatabaseInstance0", "state": "ACTIVE", "storage": { "databases": [ { "collections": [ { "dataSources": [ { "allowInsecure": false, "collection": "my-collection", "collectionRegex": "^list", "database": "my-database", "databaseRegex": ".*", "defaultFormat": ".avro", "path": "/foo/path", "provenanceFieldName": "my-prov", "storeName": "my-store", "urls": [ "https://atlas-data-lake.s3.amazonaws.com/json/sample_airbnb/listingsAndReviews.json","https://atlas-data-lake.s3.amazonaws.com/json/sample_weatherdata/data.json" ] } ], "name": "my-collection-mdb" } ], "maxWildcardCollections": 100, "name": "my-database-mdb", "views": [ { "name": "my-view", "pipeline": "[{"$group": {"_id": "$status","count": {"$sum": 1 }},"text": { "$push": "$text" }}},{ "$sort": {"count": 1 }}]", "source": "my-source-collection" } ] } ], "stores": [ { "name": "egAtlasStore", "provider": "atlas", "additionalStorageClasses": [ "STANDARD" ], "bucket": "sample-data-atlas", "delimiter": "/", "includeTags": false, "prefix": "/sample", "public": false, "region": "US_GOV_WEST_1" } ] } }