FederationDataSource Class

A federated data source that integrates different data sources and provides uniform data access with a federated query.

Namespace: DevExpress.DataAccess.DataFederation

Assembly: DevExpress.DataAccess.v21.1.dll

Declaration

[ToolboxBitmap(typeof(ResFinder), "Bitmaps256.FederationDataSource.bmp")]
[ToolboxSvgImage("DevExpress.DataAccess.Images.FederationDataSource.svg,DevExpress.DataAccess.v21.1, Version=21.1.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672")]
[XRDesigner("DevExpress.DataAccess.UI.Design.XRFederationDataSourceDesigner,DevExpress.DataAccess.v21.1.UI, Version=21.1.99.0, Culture=neutral, PublicKeyToken=c38a27d2243c2672", typeof(IDesigner))]
public class FederationDataSource :
    FederationDataSourceBase,
    IListSource,
    IFederationListAdapter,
    IListAdapterAsync,
    IListAdapter,
    ISupportInitialize,
    IXtraSerializable,
    IXtraSupportDeserializeCollectionItem

Remarks

The FederationDataSource class is a federated data source that integrates different data sources and provides uniform data access with a federated query.

Federated Data Source supports the following data source types:

You can create federated queries of the following types:

  • Join

    Combines rows from two or more tables based on a column they share. The join type specifies records that have matching values in both tables. In API, create the SelectNode instance.

  • Union and Union All

    The Union query combines rows from two or more tables into one data set and removes duplicate rows in merged tables. The UnionAll query operates like Union, but duplicates rows from different tables when they contain the same data. You can only create a union query for data sources that contain columns with the same name. Data types of such columns should be implicitly converted. In API, create the UnionNode instance and specify UnionNode.Type as Union/UnionAll.

  • Transformation

    If a data source contains a complex column (an object), you can transform its properties to display them as separate columns in a flattened view. If one of the data columns is an array, you can unfold its values and display a new data row for every element of the array. When you unfold the column, you can flatten it and create a flattened view. In API, create the TransformationNode instance.

You can create the federated data source at design time or runtime.

Design Time

Use the Data Source Wizard in Reporting and Dashboards products to create a federated data source and connect to it.

The wizard allows you to create a federated query based on data from other data sources.

Data Source Wizard - Query Builder

The wizard automatically assigns the name to a federated data source and federated query. The federated data source name is “Federation Data Source N” where N is a serial number. The federated query name is the same as the name of the first data source included in the query.

Run Time

Use a default constructor to create a FederationDataSource class instance.

The main part of the Federated Data Source is the FederationDataSourceBase.Queries collection that contains federated queries.

See the following example for information on how to create federated data sources at runtime.

See Also