Adobe Experience Platform File Generator

In this article

Overview

Use this Snap to read data from upstream Snaps and prepare them for writing into Adobe Enterprise Platform (AEP) as JSON or Parquet files.

Prerequisites

  • The schema that you want to use with this Snap should exist in the Adobe Experience Platform. If you do not have the schema ready, create it using the Adobe Experience Platform user interface before using this Snap.

Limitations and Known Issues

  • While the Schema NameDataset Name, and Connectors Object Name fields are expression enabled, their purpose is to read Pipeline parameter values. This Snap does not read values from upstream Snaps. You can, however, add this Snap in Pipelines with other Snaps to execute them in a sequence.

Snap Input and Output

Input/OutputType of ViewNumber of ViewsCompatible Upstream and Downstream SnapsDescription
Input Document
  • Min: 1
  • Max: 1
  • Mapper Snap
  • Binary to Document Snap
  • Sort Snap
Each input document contains documents that must be prepared for writing to Adobe Experience Platform.
OutputDocument
  • Min: 1
  • Max: 1
  • Mapper Snap
  • Join Snap
  • Union Snap

Each output document lists out the absolute path to the reformatted output file.

Snap Settings

Parameter NameData TypeDescriptionDefault ValueExample 
LabelStringRequired. The name for the Snap. Modify this to be more specific, especially if there is more than one of the same Snap in the Pipeline.Adobe Experience Platform File GeneratorRead and Reformat Documents from S3
Schema NameString

Required. The name of the schema to be used to create the output Parquet or JSON file. This schema should already have been created in AEP.

This Snap reads Pipeline parameters, but not values from upstream Snaps. You can, however, add this Snap in Pipelines with other Snaps to execute them in a sequence.

N/ASnaplogic Demo Experience Event Schema
Schema TypeString

Required. The schema type that you want to use to create the output file. Click to select from the following options:

  • Parquet
  • JSON
ParquetJSON
Snap execution StringSelect one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Execute onlyValidate and Execute

Troubleshooting

ErrorReasonResolution
Invalid Snap configuration

Property Schema Name is null or missing.

This typically means that either you did not specify the schema that you want to use or misspelled the schema name.

Provide a valid schema name.
Unable to load the private key for the given aliasKeystore file not found at the given keystore path.This error appears when the account doesn't have valid values. Ensure that the keystore path, keystore passphrase, private key alias, and private key passphrase are correct. Also, you must upload the keystore in the Keystore Path that you specify.
Unable to obtain access tokenThis message appears when the endpoint account details are incorrect.Check your Organization ID, Technical Account ID, Client ID, Client Secret Key details and try again.

Examples

Writing JSON Documents from S3 as Parquet Files in AEP

In this example, you retrieve a JSON document from your AWS S3 account and write it as a parquet file in a target AWS S3 database.

You design your Pipeline as follows:

S3 File Reader

You add an S3 File Reader Snap to the Canvas and configure it to retrieve the file that you want to reformat for AEP.

You attach a JSON Parser Snap to the S3 File Reader, so you can work with the contents of the file in the Pipeline and view its contents.

 

Map fields to schema

You can now modify the contents of the file in SnapLogic and make it compliant with the AEP schema that you want to use. You use a Mapper Snap to do so.

  • You use a random ID generator function to assign an ID ($_id) to each document.
  • You place all the data in each incoming document into <tenant_id> (for example, _snaplogicinc).
  • You use the Date.now function to create a $timestamp field associated with each document.

The preview the output of the Mapper Snap to check whether documents are structured as you wanted them. You see that each output document contains three high-level fields:

  • A document ID, labeled "_id".
  • The original data, labeled "_snaplogicinc".
  • A timestamp, labeled "timestamp".

 

Adobe Experience Platform File Generator

You add an Adobe Experience Platform File Generator Snap, and configure it to create an AEP-compliant Parquet file using the documents coming in from the Mapper Snap.

Once execution succeeds, the Snap output lists the location of the Parquet file created.

Read file from disk

You use a File Reader Snap to read the Parquet file created by the AEP File Generator Snap.

The output of the Snap cannot be read, as it is in Parquet format; but you can see that the Read operation succeeded.

Write file to S3

You use an S3 File Writer to write the file to an S3 directory.

Once the write operation is successful, the Snap lists out details associated with the file written.

Download this Pipeline

Downloads

  File Modified

File AEP_FileGenerator_Example.slp

Apr 24, 2020 by Siddharth Menon

Snap Pack History

 Click to view/expand

4.24 (main8556)

  • No updates made.

4.23 423patches7447

  • Fixes the Adobe Experience Platform Execute Snap issue of not passing data correctly to the downstream Snap by creating Map obj = new LinkedHashMap(); inside loop. LinkedHashMap is a hash table and linked list implementation of the Map interface, with a predictable iteration order. 

4.23 (main7430)

  • Replaces the Adobe Cloud Platform Snap Pack.
  • Introduces the Adobe Experience Platform Read Snap that enables executing SQL queries in the Adobe Experience Platform.
  • Updates the Adobe Experience Platform JWT Account to enable you to create accounts in a Sandbox location during the development phase.
  • Enhances the Adobe Experience Platform Read Snap by adding fields, Batch IDsStart date, and End Date to allow filtering batches by ID, start date, and end date with millisecond precision.

4.22 (main6403)

4.21 Patches

4.21 (snapsmrc542)

4.20 (snapsmrc535)

  • No updates made.

4.19 (snapsmrc528)

  • No updates made.

4.18 (snapsmrc523)

  • Enhanced the Snap Pack to support the Map datatype in XSD-based datasets.

4.17 Patch ALL7402

  • Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17 (snapsmrc515)

  • Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16 (snapsmrc508)

  • No updates made. Automatic rebuild with a platform release.

4.15 (snapsmrc500)

  • No updates made. Automatic rebuild with a platform release.

4.14 (snapsmrc490) 

  • No updates made. Automatic rebuild with a platform release.

4.13 (snapsmrc486)

  • New! Initial release of the Snap Pack. This includes Adobe Cloud Platform Read and Adobe Cloud Platform Write Snaps.
  • Introduced the basic Adobe Cloud Platform JWT Account.