Cmdlets for MongoDB

Build 25.0.9434

BuiltInColumnMapping Parameter (Connect-MongoDB Cmdlet)

A comprehensive list detailing the mappings of column names for the built-in fields used in MongoDB.

Syntax

Connect-MongoDB -BuiltInColumnMapping string

Data Type

cstr

Default Value

""

Remarks

This property allows users to input a list of MongoDB column names, separated by commas, and maps these built-in columns to newly defined names. If this property is defined, it directs the cmdlet to utilize a predefined set of mappings between MongoDB's document fields and the SQL columns.

The remappable built-in columns are "_index", "P_id", "_id" and "parent_id".

For example:

_index=BuiltInIndex,P_id=Root_Id,_id=My_Id,parent_id=My_Parent_id

Remapping these columns is important, particularly in addressing common issues such as "column names must be unique" errors. These conflicts often occur when the cmdlet encounters extra columns labeled "_index", "P_id", "_id" or "parent_id" in addition to the standard built-in columns.

This property is useful for modifying reserved names, offering flexibility in database design, and avoiding conflicts.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434