Ingest data from Adobe Commerce

Important

This feature is in Beta. To use it, a workspace admin must turn on Lakeflow Connect for Adobe Commerce from the Previews page. See Manage Azure Databricks previews.

Create a managed Lakeflow Connect pipeline that ingests Adobe Commerce data into Unity Catalog tables. Use the Azure Databricks UI, Declarative Automation Bundles, or a notebook.

Requirements

  • Meet the following requirements:

    • Your workspace must be enabled for Unity Catalog.

    • Serverless compute must be enabled for your workspace. See Serverless compute requirements.

    • To create a new connection, you must have CREATE CONNECTION privileges on the metastore. See Manage privileges in Unity Catalog.

      If the connector supports UI-based pipeline authoring, an admin can create the connection and the pipeline at the same time by completing the steps on this page. However, if the users who create pipelines use API-based pipeline authoring or are non-admin users, an admin must first create the connection in Catalog Explorer. See Connect to managed ingestion sources.

    • To use an existing connection, you must have USE CONNECTION privileges or ALL PRIVILEGES on the connection object.

    • You must have USE CATALOG privileges on the target catalog.

    • You must have USE SCHEMA and CREATE TABLE privileges on an existing schema or CREATE SCHEMA privileges on the target catalog.

  • Configure source authentication and create a connection.

Connector options

Set start_datetime separately for each incremental table using the UI date/time picker in your local time zone or a UTC ISO 8601 timestamp in a pipeline specification. See the connector options reference for the format, default, and resume behavior.

Keep the start time unchanged after pipeline creation. To change the historical range, configure the desired start time and perform a full refresh of the affected table. For instructions, see Fully refresh target tables.

Create an ingestion pipeline

Review the supported tables before selecting source objects. Select returns and gift_wrappings only on Adobe Commerce installations with those modules.

Databricks UI

  1. In the workspace sidebar, click Data Ingestion.
  2. On the Add data page, under Databricks connectors, click Adobe Commerce.
  3. On the Connection page, select the connection that stores the source credentials. If you have the CREATE CONNECTION privilege on the metastore, click Plus icon. Create connection to create a connection with the credentials from source setup.
  4. Click Next.
  5. On the Ingestion setup page, enter a pipeline name and select a catalog and schema for pipeline event logs.
  6. Click Create pipeline and continue.
  7. On the Source page, select the tables to ingest.
  8. (Optional) For each incremental table, set Start date and time using the date/time picker.
  9. Click Save and continue.
  10. On the Destination page, select the destination catalog and schema for the Adobe Commerce tables, then click Save and continue.
  11. (Optional) On the Schedules and notifications page, create a schedule or add notifications.
  12. Click Save and run pipeline.

The event-log location is configured independently of the destination for ingested tables.

To set per-table options through the pipeline specification, use the examples.

Declarative Automation Bundles

Use Declarative Automation Bundles to manage pipeline and job definitions as code. See What are Declarative Automation Bundles?.

  1. Create a bundle with databricks bundle init.
  2. Add the pipeline YAML from Examples to a resource file such as resources/adobe_commerce_pipeline.yml.
  3. Add a job definition to schedule ingestion.
  4. Deploy the bundle with databricks bundle deploy.

Databricks notebook

  1. Import the following notebook into your Azure Databricks workspace:

    Get notebook

  2. Replace the placeholders in cell three with your pipeline configuration, then run cells two and three.

To create a notebook manually, define the pipeline creation helper in a setup cell:

import json
from databricks.sdk import WorkspaceClient

workspace = WorkspaceClient()

def create_pipeline(payload):
    return workspace.api_client.do(
        "POST", "/api/2.0/pipelines", body=json.loads(payload)
    )

Add a cell with the Python specification in Examples, replace the placeholders, and run the cell.

Examples

All source tables use the default source schema. Select individual tables to customize their start times and avoid unavailable Adobe Commerce-only modules.

Ingest specific tables

These examples ingest products, orders, and store_views. Replace each start placeholder with a UTC ISO 8601 timestamp such as 2024-01-01T00:00:00Z.

The two incremental tables have independent start times. The snapshot table store_views does not accept start_datetime.

Declarative Automation Bundles

resources:
  pipelines:
    adobe_commerce_pipeline:
      name: <pipeline-name>
      ingestion_definition:
        connection_name: <connection-name>
        objects:
          - table:
              source_schema: default
              source_table: products
              destination_catalog: <destination-catalog>
              destination_schema: <destination-schema>
              connector_options:
                api_source_connector_options:
                  options:
                    start_datetime: '<products-start-datetime>'
          - table:
              source_schema: default
              source_table: orders
              destination_catalog: <destination-catalog>
              destination_schema: <destination-schema>
              connector_options:
                api_source_connector_options:
                  options:
                    start_datetime: '<orders-start-datetime>'
          - table:
              source_schema: default
              source_table: store_views
              destination_catalog: <destination-catalog>
              destination_schema: <destination-schema>

Databricks notebook

Run the setup cell first, then run this specification:

pipeline_spec = {
  "name": "<pipeline-name>",
  "ingestion_definition": {
    "connection_name": "<connection-name>",
    "objects": [
      {
        "table": {
          "source_schema": "default",
          "source_table": "products",
          "destination_catalog": "<destination-catalog>",
          "destination_schema": "<destination-schema>",
          "connector_options": {
            "api_source_connector_options": {
              "options": {
                "start_datetime": "<products-start-datetime>"
              }
            }
          }
        }
      },
      {
        "table": {
          "source_schema": "default",
          "source_table": "orders",
          "destination_catalog": "<destination-catalog>",
          "destination_schema": "<destination-schema>",
          "connector_options": {
            "api_source_connector_options": {
              "options": {
                "start_datetime": "<orders-start-datetime>"
              }
            }
          }
        }
      },
      {
        "table": {
          "source_schema": "default",
          "source_table": "store_views",
          "destination_catalog": "<destination-catalog>",
          "destination_schema": "<destination-schema>"
        }
      }
    ]
  }
}

create_pipeline(json.dumps(pipeline_spec))

Declarative Automation Bundles job definition file

This job runs the pipeline daily:

resources:
  jobs:
    adobe_commerce_job:
      name: adobe_commerce_job
      schedule:
        quartz_cron_expression: '0 0 0 * * ?'
        timezone_id: 'UTC'
      tasks:
        - task_key: adobe_commerce_ingestion
          pipeline_task:
            pipeline_id: ${resources.pipelines.adobe_commerce_pipeline.id}

Common patterns

For column selection, row filtering, and history tracking, see Common patterns for managed ingestion pipelines.

Next steps

Start, schedule, and set alerts on the pipeline. See Common pipeline maintenance tasks.

Additional resources