How to use mapper
I'll help you understand how to use the Mapper Snap in SnapLogic. Let me search for comprehensive information about the Mapper Snap functionality. # How to Use the Mapper Snap The **Mapper Snap** is one of the most versatile and commonly used Snaps in SnapLogic. It's a Transform-type Snap that allows you to map input fields to output fields using JavaScript expressions or the Expression Builder. ## Key Features - **Transform data** by mapping input fields to output fields - **Use expressions** to manipulate, combine, or transform data - **Pass through** original data while adding new fields - **Handle null values** safely with null-safe access - **Works with both document and binary data** ## Basic Configuration ### 1. **Label** Give your Mapper Snap a descriptive name, especially if you have multiple Mappers in your pipeline. ### 2. **Pass Through** - **Selected**: Passes all original input data to output along with your transformations - **Deselected**: Only outputs the fields you explicitly map in the mapping table ### 3. **Null-Safe Access** - **Selected**: Sets target value to null if source path doesn't exist (prevents errors) - **Deselected**: Snap fails if source path doesn't exist ## Using the Mapping Table The mapping table is where you define your transformations: ### **Expression Column** - Enter JavaScript expressions to transform data - Use field references like $firstName, $lastName - Combine fields: $firstName.concat(" ", $lastName) - Apply functions: $email.toLowerCase() ### **Target Path Column** - Specify where to write the result - Examples: $fullName, $customer.email, $processedDate ## Common Use Cases ### **1. Combine Fields**
javascript
Expression: $firstName.concat(" ", $lastName)
Target Path: $fullName
### **2. Transform Data Types**
javascript
Expression: parseFloat($price)
Target Path: $numericPrice
### **3. Conditional Logic**
javascript
Expression: $age >= 18 ? "Adult" : "Minor"
Target Path: $ageGroup
### **4. Date Formatting**
javascript
Expression: Date.now()
Target Path: $timestamp
## Tips for Success 1. **Use AutoLink** - Click the AutoLink button to automatically map fields with matching names 2. **Drag and Drop** - Drag fields from Input Schema to the mapping table for quick setup 3. **Search Fields** - Use the search functionality to find specific fields in large schemas 4. **Preview Data** - Use the data preview to see your transformations before execution 5. **Handle Numeric Data** - Use parseFloat() or parseInt() when working with numeric strings ## Best Practices - Always test your expressions with sample data - Use descriptive target path names - Enable null-safe access when dealing with optional fields - Consider using Pass Through when you need to preserve original data - Use the Expression Builder for complex transformations The Mapper Snap is essential for data transformation in SnapLogic pipelines and becomes more powerful as you learn to use expressions effectively for your specific data transformation needs.
How to use Oracle Bulk Loader snap?
I'll help you learn about the Oracle Bulk Loader snap and how to use it effectively. # How to Use Oracle Bulk Loader Snap The **Oracle Bulk Load Snap** is a powerful write-type Snap that allows you to process large amounts of data efficiently by performing bulk load operations into Oracle database tables. ## Overview The Oracle Bulk Load Snap uses Oracle SQL*Loader internally to perform bulk load operations. It first writes input data to either: - A temporary data file (on Windows JCC) - A named pipe (on Linux JCC) Then SQL*Loader loads the data from the file/pipe into the target table. ## Prerequisites - **Oracle SQL*Loader utility** must be installed on Groundplex nodes (not supported on Cloudplexes) - Valid Oracle Account configured in SnapLogic Manager - The Snap uses EZCONNECT to connect to Oracle (no TNSNames or LDAP) ## Key Configuration Settings ### Basic Settings 1. **Schema name**: Specify the database schema name 2. **Table name**: The target table for bulk loading (required) 3. **Create table if not present**: Automatically create the target table if it doesn't exist ### SQL*Loader Configuration 1. **Sqlldr absolute path**: Path to the sqlldr executable - Linux example: /u01/app/oracle/product/11.2.0/xe/bin/sqlldr - Windows example: C:\app\Administrator\product\11.2.0\client_1\bin\sqlldr.exe 2. **Insert mode**: Choose how to handle existing data - **INSERT**: Load only if table is empty - **APPEND**: Add new rows to existing data (default) - **REPLACE**: Delete all existing rows first, then load - **TRUNCATE**: Truncate table first, then load ### Performance Settings 1. **Maximum error count**: Number of failed rows before stopping (default: 50) 2. **Use direct path load**: Enable for better performance with large datasets (recommended) 3. **Skip virtual columns**: Prevent errors with virtual columns (recommended) ### Advanced Options - **Additional SQL Loader Parameters**: Configure parameters like BINDSIZE, ROWS, PARALLEL, etc. - **Column Length Overrides**: Override column lengths for CLOB/NCLOB data types ## Input/Output Views - **Input**: One document input view (optional second view for table metadata) - **Output**: One document output view showing load results - **Error**: Error view for rejected records (populated after load completion) ## Important Limitations - Does not work in Ultra Pipelines - BLOB data type is not supported - Tables with virtual columns cannot be bulk loaded directly (use views as workaround) - Does not support Kerberos authentication ## Example Usage Here's a typical configuration workflow: 1. Configure the Oracle Account with proper credentials 2. Set the **Schema name** and **Table name** 3. Specify the **Sqlldr absolute path** if not in system PATH 4. Choose appropriate **Insert mode** (APPEND for adding to existing data) 5. Set **Maximum error count** based on your tolerance for failed records 6. Enable **Use direct path load** for better performance 7. Connect your data source to the input view The Snap will process your input documents, perform the bulk load operation, and output statistics about the number of records loaded successfully. Any rejected records will be routed to the error view with detailed error information. This makes the Oracle Bulk Load Snap ideal for ETL operations where you need to efficiently load large volumes of data into Oracle databases.
