All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

TransformationNodeBuilder.FlattenColumn(String) Method

Creates individual columns from the fields of the specified column.

Namespace: DevExpress.DataAccess.DataFederation

Assembly: DevExpress.DataAccess.v21.1.dll

Declaration

public TransformationNodeBuilder FlattenColumn(
    string columnName
)

Parameters

Name Type Description
columnName String

The name of a column that should be flattened.

Returns

Type Description
TransformationNodeBuilder

The result of the transformation query.

Example

The following example demonstrates how to flatten a data source’s ProductInfo column.

Show JSON Data
[
    {
        "ProductID": 1,
        "ProductInfo":
        {
            "Name": "Chai",
            "UnitPrice": 18
        }
    },
    {
        "ProductID": 2,
        "ProductInfo":
        {
            "Name": "Chang",
            "UnitPrice": 19
        }
    }
]
using DevExpress.DataAccess.DataFederation;
using DevExpress.DataAccess.Json;
// ...
var source = new Source("Products", jsonDataSource);

var query = source
    .Transform()
    .FlattenColumn("ProductInfo")
    .Build("ProductsFlattened");

var federation = new FederationDataSource() {
    Queries = { query }
};

The following schema is the result of the transformation:

"ProductID": int
"ProductInfo_Name": string
"ProductInfo_UnitPrice": string
See Also