LogoLogo
Back to OsmosDeveloper DocsOsmos BlogWhat's New
  • Welcome to Osmos
  • πŸ‘‹Getting Started with Osmos
    • Terminology
  • πŸŽ‰What's New
  • 🧩Osmos API Reference
  • ⌨️Osmos Chat
  • πŸ‘©β€πŸ’»Developer Docs
    • Manage API Keys
    • Embedding an Osmos Uploader
    • Embedding Uploader Jobs Table
    • Turning on Advanced Mode Uploader
    • Customizing Uploader Styling
    • Passing Parameterized Fields
    • Configuring Uploader's "Recall" functionality
    • Optional Uploader Settings
    • Uploader Submission Callback
    • Configuring AutoClean for your Uploader
    • Uploader Client-Side Validation
      • Data Validators
      • Checking for Duplicate values in a field
      • Creating Dropdown-Controlled Fields
      • Dynamic Dropdown Options
      • Dropdown Interaction with Validation Functions
    • Validation and Transformation Webhooks
      • OpenAPI Validation Webhook Testing
    • Parser Webhook for file based connectors
  • πŸ” Datasets
    • Osmos Datasets
      • Uploading Data to your Table
      • Creating Primary and Foreign keys
      • Osmos Dataset Destination Connector
      • Osmos Dataset Source Connector
      • Dataset Edits
    • Datasets Query Builder
      • Query Builder Metadata
    • Performing Look Ups
      • Performing Joins
        • Types of Joins
  • ⏏️Uploader
    • Creating an Osmos Uploader
      • Testing your Osmos Uploader
    • Uploader Validation Summary
    • Advanced Mode
      • Overview
      • Process
    • Standard Mode
      • Overview
      • AutoClean
      • Process
    • AI AutoMapping
    • Uploaders Page
    • Uploader Details Page
  • πŸ”€Pipelines
    • Step 1. Select the Source
    • Step 2. Select a Destination
    • Step 3. Map & Transform Data
    • Step 4. Schedule the Pipeline
    • Step 5. Review & Confirm
    • Pipelines Page
    • Pipeline Details Page
  • ⏩Data Transformations
    • AutoMap
    • Column Mapping & Data Cleanup Panel
    • QuickFixes
    • AI Value Mapping
    • AI AutoClean
    • Lookups
      • Performing Lookups
    • SmartFill
    • Formulas
      • Date & Time Formulas
        • DateTime Format Specifiers
        • Timezone specifiers
      • Math Formulas and Operators
      • Logical Formulas & Operators
        • True & False Casting
      • Text Formulas
      • Other Formulas
    • Deduplication
  • β†˜οΈSource Connectors
    • Amazon S3
    • Azure Blob Storage
    • BigQuery
    • Email
    • FTP
    • Google Cloud Storage (GCS)
    • Google Drive
    • Google Sheets
    • HTTP API (Call an Osmos API)
    • HTTP API (Osmos Calls Your API)
    • Osmos Dataset
    • Snowflake
    • Accessing Sources behind firewall
  • ↖️Destination Connectors
    • Amazon S3
    • BigQuery
    • FTP
    • Google Cloud Storage (GCS)
    • Google Drive
    • Google Sheets
    • HTTP API (Call an Osmos API)
    • HTTP API (Osmos Calls Your API)
      • Passing Dynamic Tokens in the API Header
    • MySQL
    • Osmos Dataset
    • PostgreSQL
    • Snowflake
    • Accessing Destinations behind firewall
  • πŸ—‚οΈProjects
  • βš™οΈAdministration
    • Email Notifications
  • πŸ”’Security
  • πŸ“žSupport
  • Back to Osmos.io
Powered by GitBook
On this page

Was this helpful?

  1. Developer Docs

Uploader Submission Callback

PreviousOptional Uploader SettingsNextConfiguring AutoClean for your Uploader

Last updated 9 months ago

Was this helpful?

The Osmos Uploader provides a Callback to the host page when the Osmos Uploader window closes. The callback is made to the function mapped to the completionHandler key. This key is optional. If a handler function is assigned, it will provide:

  1. originalFileUrl: URL of original uploaded file. The file will be available at this for the data retention duration configured on your Osmos account, after which the URL will return 404. In order to to avoid name collisions, the filename will be appended with GUID values.

  2. reachedTransformStep: Boolean indicating if the user successfully reached the transformation step

  3. successfullySubmittedData: Boolean if the user successfully submitted data and completed the upload experience

  4. numRecordsSubmitted: Number of records submitted

  5. skippedRowNumbers: Array of row numbers that were skipped, starting at data row number 0, and not including the header row in the count.

  6. jobId: The UUID which corresponds to this specific Osmos Uploader run.

The Callback is triggered by one of two ways:

1. When the user selects the submit button

2. When the user closers the modal (Callback will be triggered with zero rows submitted)

For more information on Optional configuration features like completionHandler, see .

Here’s an example of a code snippet for a completionHandler callback

Osmos.configure({
  userID: window.curUserID,
  completionHandler: async (params)=> {
    console.log(params)
  },
  schema: {
    fields: [
      {
        name: 'field1',
        displayName: 'Field 1'
      },
      ...
    ],
  },
  ...
}

interface CompletionHandlerArgs {
  originalFileUrl: string,
  reachedTransformStep: boolean,
  successfullySubmittedData: boolean,
  numRecordsSubmitted: number,
  skippedRowNumbers: Array,
  jobId: string
}
πŸ‘©β€πŸ’»
Optional Settings