cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Ingesting data from a SharePoint Excel file with two worksheets in one pipeline

Bodyes
Visitor

Hi,
I would like to ask about ingesting data from an Excel file stored in SharePoint.

Currently, I have one Excel file containing two worksheets:

  • one worksheet contains dimension data,
  • the other worksheet contains target values.

I would like to ingest both worksheets using a single pipeline. My pipeline definition is:

id: <id>
pipeline_type: MANAGED_INGESTION
name: sharepoint_mnf_kpi_ingest
ingestion_definition:
  connection_name: sharepoint_connection
  objects:
    - table:
        destination_catalog: dlt_tst
        destination_schema: sharepoint_tst
        destination_table: mnf_kpi_targets_one_file
        table_configuration:
          storage_mode: APPEND_ONLY
        connector_options:
          sharepoint_options:
            url: https://<tenant>.sharepoint.com/sites/Self-ServiceBIAnalytics/Shared%20Documents/DataHub/DEV/MNF_KPI.xlsx
            entity_type: FILE
            file_ingestion_options:
              format: EXCEL
              schema_evolution_mode: NONE
              format_options:
                headerRows: "1"
                dataAddress: mnf_kpi_targets
    - table:
        destination_catalog: dlt_tst
        destination_schema: sharepoint_tst
        destination_table: mnf_kpi_dim_one_file
        table_configuration:
          storage_mode: APPEND_ONLY
        connector_options:
          sharepoint_options:
            url: https://<tenant>.sharepoint.com/sites/Self-ServiceBIAnalytics/Shared%20Documents/DataHub/DEV/MNF_KPI.xlsx
            entity_type: FILE
            file_ingestion_options:
              format: EXCEL
              schema_evolution_mode: NONE
              format_options:
                headerRows: "1"
                dataAddress: mnf_kpi_dim
  source_type: SHAREPOINT
schema: sharepoint_tst
channel: PREVIEW
catalog: dlt_tst
usage_policy_id: <id>

With this configuration, the mnf_kpi_targets_one_file table inherits the schema of the second worksheet, mnf_kpi_dim_one_file.

Bodyes_1-1784706752989.pngBodyes_2-1784706801632.png

The number of rows imported into mnf_kpi_targets_one_file is correct, which suggests that the correct worksheet is being read. However, the table contains the column structure of mnf_kpi_dim_one_file, and the values in those columns are NULL.

The two worksheets have different schemas.

Excel worksheet: DIM

Bodyes_4-1784706956591.png

Excel worksheet: Targets

Bodyes_5-1784706989458.png

When I run read_files() directly with:
dataAddress => 'mnf_kpi_targets'
the correct worksheet, columns, and data are returned.

Is this a known limitation or bug in Managed Ingestion when multiple objects use the same Excel file URL with different dataAddress values, or is there an issue with my pipeline configuration?

Thanks in advance.

 

 

1 REPLY 1

MuhammadUmar
New Contributor II

Based on the behavior you described, this looks like a Managed SharePoint ingestion bug or preview limitation, not an obvious error in your configuration.

Databricksโ€™ Excel reader supports selecting one worksheet with dataAddress, and your successful read_files() test confirms that both the worksheet name and Excel structure are valid. Databricks also documents that the Excel parser reads one sheet at a time and uses dataAddress to select a different sheet.

The suspicious part is this combination:

  • Both ingestion objects use the same SharePoint file URL.
  • Each object specifies a different dataAddress.
  • The correct row count is read from each