Skip to content

Commit 7e0d8d7

Browse files
authored
feat: Add datasetName to storage_databases.collections.data_sources in mongodbatlas_federated_database_instance (#1439)
1 parent dfedeae commit 7e0d8d7

5 files changed

+13
-0
lines changed

mongodbatlas/data_source_mongodbatlas_federated_database_instance.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ func schemaFederatedDatabaseInstanceDatabasesDataSource() *schema.Schema {
122122
Type: schema.TypeString,
123123
Computed: true,
124124
},
125+
"dataset_name": {
126+
Type: schema.TypeString,
127+
Computed: true,
128+
},
125129
"default_format": {
126130
Type: schema.TypeString,
127131
Computed: true,

mongodbatlas/resource_mongodbatlas_federated_database_instance.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ func schemaFederatedDatabaseInstanceDatabases() *schema.Schema {
139139
Type: schema.TypeString,
140140
Optional: true,
141141
},
142+
"dataset_name": {
143+
Type: schema.TypeString,
144+
Optional: true,
145+
},
142146
"default_format": {
143147
Type: schema.TypeString,
144148
Optional: true,
@@ -618,6 +622,7 @@ func newDataFederationDataSource(collectionFromConf map[string]interface{}) []ad
618622
Path: stringPtr(dataSourceFromConfMap["path"].(string)),
619623
ProvenanceFieldName: stringPtr(dataSourceFromConfMap["provenance_field_name"].(string)),
620624
StoreName: stringPtr(dataSourceFromConfMap["store_name"].(string)),
625+
DatasetName: stringPtr(dataSourceFromConfMap["dataset_name"].(string)),
621626
Urls: newUrls(dataSourceFromConfMap["urls"].([]interface{})),
622627
}
623628
}
@@ -774,6 +779,7 @@ func flattenDataFederationDataSources(atlasDataSources []admin.DataLakeDatabaseD
774779
"path": AtlasDataSource.GetPath(),
775780
"provenance_field_name": AtlasDataSource.GetProvenanceFieldName(),
776781
"store_name": AtlasDataSource.GetStoreName(),
782+
"dataset_name": AtlasDataSource.GetDatasetName(),
777783
"urls": AtlasDataSource.GetUrls(),
778784
}
779785
}

website/docs/d/federated_database_instance.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ In addition to all arguments above, the following attributes are exported:
5757
* `storage_databases.#.collections.#.name` - Name of the collection.
5858
* `storage_databases.#.collections.#.data_sources` - Array of objects where each object represents a stores data store to map with the collection.
5959
* `storage_databases.#.collections.#.data_sources.#.store_name` - Name of a data store to map to the `<collection>`. Must match the name of an object in the stores array.
60+
* `storage_databases.#.collections.#.data_sources.#.dataset_name` - Human-readable label that identifies the dataset that Atlas generates for an ingestion pipeline run or Online Archive.
6061
* `storage_databases.#.collections.#.data_sources.#.default_format` - Default format that Federated Database assumes if it encounters a file without an extension while searching the storeName.
6162
* `storage_databases.#.collections.#.data_sources.#.path` - File path that controls how MongoDB Cloud searches for and parses files in the storeName before mapping them to a collection. Specify / to capture all files and folders from the prefix path.
6263
* `storage_databases.#.collections.#.data_sources.#.database` - Human-readable label that identifies the database, which contains the collection in the cluster.

website/docs/d/federated_database_instances.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ In addition to all arguments above, the following attributes are exported:
4747
* `storage_databases.#.collections.#.name` - Name of the collection.
4848
* `storage_databases.#.collections.#.data_sources` - Array of objects where each object represents a stores data store to map with the collection.
4949
* `storage_databases.#.collections.#.data_sources.#.store_name` - Name of a data store to map to the `<collection>`. Must match the name of an object in the stores array.
50+
* `storage_databases.#.collections.#.data_sources.#.dataset_name` - Human-readable label that identifies the dataset that Atlas generates for an ingestion pipeline run or Online Archive.
5051
* `storage_databases.#.collections.#.data_sources.#.default_format` - Default format that Federated Database assumes if it encounters a file without an extension while searching the storeName.
5152
* `storage_databases.#.collections.#.data_sources.#.path` - File path that controls how MongoDB Cloud searches for and parses files in the storeName before mapping them to a collection. Specify / to capture all files and folders from the prefix path.
5253
* `storage_databases.#.collections.#.data_sources.#.database` - Human-readable label that identifies the database, which contains the collection in the cluster.

website/docs/r/federated_database_instance.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ In addition to all arguments above, the following attributes are exported:
118118
* `storage_databases.#.collections.#.name` - Name of the collection.
119119
* `storage_databases.#.collections.#.data_sources` - Array of objects where each object represents a stores data store to map with the collection.
120120
* `storage_databases.#.collections.#.data_sources.#.store_name` - Name of a data store to map to the `<collection>`. Must match the name of an object in the stores array.
121+
* `storage_databases.#.collections.#.data_sources.#.dataset_name` - Human-readable label that identifies the dataset that Atlas generates for an ingestion pipeline run or Online Archive.
121122
* `storage_databases.#.collections.#.data_sources.#.default_format` - Default format that Federated Database assumes if it encounters a file without an extension while searching the storeName.
122123
* `storage_databases.#.collections.#.data_sources.#.path` - File path that controls how MongoDB Cloud searches for and parses files in the storeName before mapping them to a collection. Specify / to capture all files and folders from the prefix path.
123124
* `storage_databases.#.collections.#.data_sources.#.database` - Human-readable label that identifies the database, which contains the collection in the cluster.

0 commit comments

Comments
 (0)