SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Consume the SDK for Data Attribute Recommendation using the AI API from SAP AI Core

Use the Python SDK to train machine learning models and run inference requests.

Overview

🎓 intermediate 30 min. Machine LearningIntermediateArtificial IntelligenceCloudSAP Business Technology PlatformSAP Ai ServicesData Attribute Recommendation

You will learn

  • โœ”How to authenticate with your service instance of Data Attribute Recommendation using the AI API from SAP AI Core
  • โœ”How to upload data and train a machine learning model
  • โœ”How to make inference requests
Juliana Morais J Juliana Morais June 5, 2025
Created by June 5, 2025
Contributors

Prerequisites

Steps

Windows macOS Linux BAS

Intro

The repository and initial setup documentation of the SDK can be found here. A complete documentation, including API reference, can be found here. See also the Help Portal documentation: AI API Reference. You can use this tutorial as the first point of contact with the SDK. Make sure to check the documentation since you can use the SDK to do much more than what is covered here.


Step 1 Get the dataset
โ€”

First, you need to download the dataset used in this tutorial. The dataset can be found here and includes data from the retail company Best Buy.

Make sure that you are in your virtual environment as explained in Setup SDK for Data Attribute Recommendation. Now, enter the following command to download the dataset from the repository:

Shell
curl -o bestBuy.csv "https://raw.githubusercontent.com/SAP-samples/data-attribute-recommendation-postman-tutorial/main/Tutorial_Example_Dataset.csv"

The dataset is then saved as bestBuy.csv.

Enter more bestBuy.csv to take a look at the first few lines of the dataset. Exit the command with CTRL + C.

Enter head -n2 bestBuy.csv to take a look at the first two lines of the dataset.

Enter head -n2 bestBuy.csv to take a look at the first two lines of the dataset.

Dataset
Dataset

The first line of the output represents the head of the dataset, for example, the column names. The dataset contains product information, including a description, a price and three levels of categories the product belongs to. The other lines are actual rows in the dataset, representing a product.

Step 2 Provide service key
+
Step 3 Upload and register training data
+
Step 4 Configure and execute model training
+
Step 5 Deploy model
+
Step 6 Make inference requests
+
Step 7 List all executions and deployments
+
Step 8 Delete deployment
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 8
1. Get the dataset 2. Provide service key 3. Upload and register training data 4. Configure and execute model training 5. Deploy model 6. Make inference requests 7. List all executions and deployments 8. Delete deployment

Learn more →