Setup Data Transformation for CDF
This topic describes the steps to set up and run data transformation where Auth0 is used as Identity Provider (IdP). A user must perform the steps in both, FactoryTalk Data Mosaix and Cognite Data Fusion (CDF). CDF, when using Auth0 as the IdP, requires client credentials in order to run data transformations.
Prerequisites
- A CDF project exists.
- You have appropriate read, write access to the project to upload data. For information on access you need, refer to Set up the CDF project and get credentials.
Register an Extractor
To run data transformation using Auth0 as the IdP, CDF requires client credentials (M2M Token). To get the appropriate client credentials, you must first register an extractor and save the client ID and secret generated.
- On the FactoryTalk DataMosaix Management Console, select theExtractor Infotab.
- Click the [Add] icon.
- On the Extractor Info Detail screen, provide a unique and meaningful name for the extractor.
- In the Pipeline field, provide the extraction pipeline name created earlier.
- Select the Source Type as Add Custom / Other.
- Click [Save and Create Credentials] to register the extractor.
- Copy and save the client secret information. You will need to use this information while setting credentials to run data transformation.
Setup Data Transformation on CDF
After you have registered the extractor and stored the client credentials, you can get started with data transformation.
Upload Data to CDF project
Before you begin with creating transformation, ensure you have uploaded the data to the CDF project either manually or using the CLI toolkit in the staging area. For information on uploading data, refer to the CDF documentation.
Create Transformation
After you have uploaded the data to the CDF project, you need to create a transformation in CDF.
- Navigate to your project in CDF and selectIntegrate > Transform Data.
- On the Transform Data screen, click [+ Create].
- Provide a unique name for the transformation.
- Provide a unique external ID.
- Select a data set to limit access to the selected data set and click [Next Step].
- In the [Target data model] list, selectCDF resource typesto ingest data.
- If you're ingesting data into the Assets resource type, make sure a parent asset already exists in CDF.
- If you're ingesting data into Sequence rows, specify the external ID for the sequence you want to write to. This defines the target schema.
- In the [Target resource type] list, selectAssets.
- In the [Action] list, selectCreate or Update. If you're updating existing data, you must specify how the transformation should set null values.
- SelectKeep existing valuesto not update existing data. This is the default setting.
- SelectClear existing valuesto set existing values to null, for example, when a piece of equipment is removed for maintenance. Use this option to disassociate the asset from its parent in the asset hierarchy.
- Click [Create] to create the transformation. After you create a transformation, you need to select a source for data transformation.The Mapping editor displays. Mapping editor helps mapping source and target.
- In theMapping editor, select the source for transformation. Select the appropriate model, database name, and the table name.
- To map your source data and target, click [Suggestions] and select all that apply.
- After you select the suggestions, click [Accept Selected]. You can see the mappings.Now you are ready to run the transformation.
Set Client Credentials for Transformation
- In the Mapping editor, click [Run} and select [Run with client credentials].If the client credentials are not set, you shall see the missing credentials dialog box. You need to set your client credentials before you can run a transformation.
- Click [Set client credentials].
- On the Client Credentials dialog box, provide the client credentials that you saved when you registered an extractor earlier.Now you are ready to run the transformation.
Run Data Transformation
- In the Mapping editor, click [Run} and select [Run with client credentials].You should now see the label [configured], when you select [Run with client credentials].
- Click [Run with client credentials].
- You can view the transformation data under Run History.
Provide Feedback