The OCP database is not included in the free version of OCP. The free version syncs data in real-time without using the OCP database, letting you access public apps and data syncs.
Contact your Customer Success Manager if you have any questions.
The File Upload app helps you import data from Amazon S3 to Optimizely Connect Platform (OCP).
Locate your Amazon S3 credentials
- Go to Data Setup > Integrations.
- Click AWS.
- Click Generate Access Keys. You only need to complete this step if you have not already generated your Amazon S3 access keys in OCP.
-
Copy the Key ID and Secret Access Key.
- Copy and paste these credentials into the Amazon S3 command-line interface (CLI) or a third-party application, like Cyberduck to complete the connection between your OCP and Amazon S3 account.
Install and configure the app
- Go to Data Setup > App Directory.
-
Select the File Upload app.
-
Click Install App. The Settings tab displays.
- Select the desired Object and Object Fields on the Settings tab.
- Click Show Example to receive an example filename and a sample of the CSV file content. This shows you how to properly format your file name and CSV file content.
- Expand the Validate section, paste the CSV File content that you want to upload, select the corresponding destination Object, and click Validate to check if your CSV file format is valid and ready for Amazon S3 upload.
Upload a file
After you use the app to confirm your CSV file is named and formatted properly, you can upload the file using the Amazon S3 CLI or the Amazon S3 SDK for JavaScript (uses Node.js).
First, copy your OCP Tracker ID from Data Setup > Integrations.
Upload file using Amazon S3 CLI
Use the following command to copy a local file to Amazon S3:
aws s3 cp <file> s3://zaius-incoming/<YOUR TRACKER ID>/
Upload file using Amazon S3 SDK (Node.js)
The following code snippet shows how to upload a file to Amazon S3 using their SDK for JavaScript.
import { S3 } from "@aws-sdk/client-s3";
import fs from "fs";
const s3Client = new S3({
credentials: {
accessKeyId: "<ACCESS_KEY>",
secretAccessKey: "<SECRET_KEY>"
},
region: 'us-east-1'
});
const body = fs.readFileSync('<YOUR_CSV_FILE>.csv');
const params = {
Bucket: '<BUCKET_NAME>',
Key: '<TRACKER_ID>/<FILENAME>.csv',
Body: body,
};
s3Client.putObject(params);
Article is closed for comments.