Редагувати

Поділитися через


Copy data from SAP Business Warehouse using Azure Data Factory or Synapse Analytics

APPLIES TO: Azure Data Factory Azure Synapse Analytics

Tip

Try out Data Factory in Microsoft Fabric, an all-in-one analytics solution for enterprises. Microsoft Fabric covers everything from data movement to data science, real-time analytics, business intelligence, and reporting. Learn how to start a new trial for free!

This article outlines how to use the Copy Activity in Azure Data Factory and Synapse Analytics pipelines to copy data from an SAP Business Warehouse (BW). It builds on the copy activity overview article that presents a general overview of copy activity.

Tip

To learn the service's overall support on SAP data integration scenario, see SAP data integration using Azure Data Factory whitepaper with detailed introduction on each SAP connector, comparison and guidance.

Supported capabilities

This SAP Business Warehouse connector is supported for the following capabilities:

Supported capabilities IR
Copy activity (source/-)
Lookup activity

① Azure integration runtime ② Self-hosted integration runtime

For a list of data stores that are supported as sources/sinks by the copy activity, see the Supported data stores table.

Specifically, this SAP Business Warehouse connector supports:

  • SAP Business Warehouse version 7.x.
  • Copying data from InfoCubes and QueryCubes (including BEx queries) using MDX queries.
  • Copying data using basic authentication.

Note

The SAP Business Warehouse connector does not currently support parameters with MDX. If filtering with MDX parameters is required you can consider using the alternative SAP Open Hub connector instead.

Prerequisites

To use this SAP Business Warehouse connector, you need to:

  • Set up a Self-hosted Integration Runtime. See Self-hosted Integration Runtime article for details.
  • Install the SAP NetWeaver library on the Integration Runtime machine. You can get the SAP Netweaver library from your SAP administrator, or directly from the SAP Software Download Center. Search for the SAP Note #1025361 to get the download location for the most recent version. Make sure that you pick the 64-bit SAP NetWeaver library which matches your Integration Runtime installation. Then install all files included in the SAP NetWeaver RFC SDK according to the SAP Note. The SAP NetWeaver library is also included in the SAP Client Tools installation.

Tip

To troubleshoot connectivity issue to SAP BW, make sure:

  • All dependency libraries extracted from the NetWeaver RFC SDK are in place in the %windir%\system32 folder. Usually it has icudt34.dll, icuin34.dll, icuuc34.dll, libicudecnumber.dll, librfc32.dll, libsapucum.dll, sapcrypto.dll, sapcryto_old.dll, sapnwrfc.dll.
  • The needed ports used to connect to SAP Server are enabled on the Self-hosted IR machine, which usually are port 3300 and 3201.

Getting started

To perform the Copy activity with a pipeline, you can use one of the following tools or SDKs:

Create a linked service to SAP BW using UI

Use the following steps to create a linked service to SAP BW in the Azure portal UI.

  1. Browse to the Manage tab in your Azure Data Factory or Synapse workspace and select Linked Services, then click New:

  2. Search for SAP and select the SAP BW via MDX connector.

    Select the SAP BW via MDX connector.

  3. Configure the service details, test the connection, and create the new linked service.

    Configure a linked service to SAP BW.

Connector configuration details

The following sections provide details about properties that are used to define Data Factory entities specific to SAP Business Warehouse connector.

Linked service properties

The following properties are supported for SAP Business Warehouse (BW) linked service:

Property Description Required
type The type property must be set to: SapBw Yes
server Name of the server on which the SAP BW instance resides. Yes
systemNumber System number of the SAP BW system.
Allowed value: two-digit decimal number represented as a string.
Yes
clientId Client ID of the client in the SAP W system.
Allowed value: three-digit decimal number represented as a string.
Yes
userName Name of the user who has access to the SAP server. Yes
password Password for the user. Mark this field as a SecureString to store it securely, or reference a secret stored in Azure Key Vault. Yes
connectVia The Integration Runtime to be used to connect to the data store. A Self-hosted Integration Runtime is required as mentioned in Prerequisites. Yes

Example:

{
    "name": "SapBwLinkedService",
    "properties": {
        "type": "SapBw",
        "typeProperties": {
            "server": "<server name>",
            "systemNumber": "<system number>",
            "clientId": "<client id>",
            "userName": "<SAP user>",
            "password": {
                "type": "SecureString",
                "value": "<Password for SAP user>"
            }
        },
        "connectVia": {
            "referenceName": "<name of Integration Runtime>",
            "type": "IntegrationRuntimeReference"
        }
    }
}

Dataset properties

For a full list of sections and properties available for defining datasets, see the datasets article. This section provides a list of properties supported by SAP BW dataset.

To copy data from SAP BW, set the type property of the dataset to SapBwCube. While there are no type-specific properties supported for the SAP BW dataset of type RelationalTable.

Example:

{
    "name": "SAPBWDataset",
    "properties": {
        "type": "SapBwCube",
        "typeProperties": {},
        "schema": [],
        "linkedServiceName": {
            "referenceName": "<SAP BW linked service name>",
            "type": "LinkedServiceReference"
        }
    }
}

If you were using RelationalTable typed dataset, it is still supported as-is, while you are suggested to use the new one going forward.

Copy activity properties

For a full list of sections and properties available for defining activities, see the Pipelines article. This section provides a list of properties supported by SAP BW source.

SAP BW as source

To copy data from SAP BW, the following properties are supported in the copy activity source section:

Property Description Required
type The type property of the copy activity source must be set to: SapBwSource Yes
query Specifies the MDX query to read data from the SAP BW instance. Yes

Example:

"activities":[
    {
        "name": "CopyFromSAPBW",
        "type": "Copy",
        "inputs": [
            {
                "referenceName": "<SAP BW input dataset name>",
                "type": "DatasetReference"
            }
        ],
        "outputs": [
            {
                "referenceName": "<output dataset name>",
                "type": "DatasetReference"
            }
        ],
        "typeProperties": {
            "source": {
                "type": "SapBwSource",
                "query": "<MDX query for SAP BW>"
            },
            "sink": {
                "type": "<sink type>"
            }
        }
    }
]

If you were using RelationalSource typed source, it is still supported as-is, while you are suggested to use the new one going forward.

Data type mapping for SAP BW

When copying data from SAP BW, the following mappings are used from SAP BW data types to interim data types used internally within the service. See Schema and data type mappings to learn about how copy activity maps the source schema and data type to the sink.

SAP BW data type Interim service data type
ACCP Int
CHAR String
CLNT String
CURR Decimal
CUKY String
DEC Decimal
FLTP Double
INT1 Byte
INT2 Int16
INT4 Int
LANG String
LCHR String
LRAW Byte[]
PREC Int16
QUAN Decimal
RAW Byte[]
RAWSTRING Byte[]
STRING String
UNIT String
DATS String
NUMC String
TIMS String

Lookup activity properties

To learn details about the properties, check Lookup activity.

For a list of data stores supported as sources and sinks by the copy activity, see supported data stores.