Azure Data Factory HubSpot Connector v2 fails when HubSpot returns empty string ("") for DateTime property notes_next_activity_date

Neel Prajapati 0 Reputation points
2026-07-31T09:24:40.2433333+00:00

Hello Microsoft Team,

I believe I have found a reproducible issue with the Azure Data Factory native HubSpot Connector (v2).

I have spent several days investigating this issue and created a minimal reproducible example. Before opening a paid support request, I would like to confirm whether this is a known connector limitation, a bug, or if there is any supported workaround.

Environment

  • Azure Data Factory

Native HubSpot Connector (v2)

Azure SQL Database

Copy Activity

AutoResolve Integration Runtime

Problem

The Copy Activity fails when the HubSpot contact property notes_next_activity_date contains an empty string ("").

The pipeline reads all HubSpot records successfully but fails before writing any rows into Azure SQL Database.

Error

Failure happened on 'Sink' side.

Column 'notes_next_activity_date' contains an invalid value ''.

String was not recognized as a valid DateTime.

Couldn't store <> in notes_next_activity_date Column.

Expected type is DateTime.

Copy Activity Statistics

Rows Read: 1315
Rows Copied: 0

This indicates the connector successfully retrieves all HubSpot contacts but fails during internal type conversion.

HubSpot API Response

For multiple contacts, HubSpot returns:

"notes_next_activity_date": ""

The HubSpot property metadata reports:

type = datetime

fieldType = date

hubspotDefined = true

Investigation Performed

I created a completely new Azure Data Factory pipeline and reproduced the issue with the smallest possible configuration.

I tested:

New pipeline

New HubSpot dataset

New Azure SQL dataset

New SQL table (Auto Create)

No ForEach activity

No dynamic parameters

No metadata-driven pipeline

No imported mapping

Auto Mapping

Default Type Conversion

Custom DateTime Format (yyyy-MM-ddTHH:mm:ss.fffZ)

Every test produced exactly the same result.

Observation

It appears the native HubSpot connector attempts to convert:

"" -> DateTime

instead of treating the empty string as NULL.

Because the exception occurs before any rows are written to SQL Server, it appears the failure happens during the connector's internal type conversion rather than during SQL insertion.

My Questions

Is this a known issue with the Azure Data Factory HubSpot Connector v2?

Is this expected behavior?

Is there any supported way to treat empty strings ("") returned by HubSpot as NULL for DateTime fields?

Is there any connector configuration, mapping option, or Copy Activity setting that can resolve this without switching to the REST connector?

I would appreciate confirmation from the Azure Data Factory engineering team or anyone who has encountered the same behavior.

Thank you.Hello Microsoft Team,

I believe I have found a reproducible issue with the Azure Data Factory native HubSpot Connector (v2).

I have spent several days investigating this issue and created a minimal reproducible example. Before opening a paid support request, I would like to confirm whether this is a known connector limitation, a bug, or if there is any supported workaround.

Environment

Azure Data Factory

Native HubSpot Connector (v2)

Azure SQL Database

Copy Activity

AutoResolve Integration Runtime

Problem

The Copy Activity fails when the HubSpot contact property notes_next_activity_date contains an empty string ("").

The pipeline reads all HubSpot records successfully but fails before writing any rows into Azure SQL Database.

Error

Failure happened on 'Sink' side.

Column 'notes_next_activity_date' contains an invalid value ''.

String was not recognized as a valid DateTime.

Couldn't store <> in notes_next_activity_date Column.

Expected type is DateTime.

Copy Activity Statistics

Rows Read: 1315
Rows Copied: 0

This indicates the connector successfully retrieves all HubSpot contacts but fails during internal type conversion.

HubSpot API Response

For multiple contacts, HubSpot returns:

"notes_next_activity_date": ""

The HubSpot property metadata reports:

type = datetime

fieldType = date

hubspotDefined = true

Investigation Performed

I created a completely new Azure Data Factory pipeline and reproduced the issue with the smallest possible configuration.

I tested:

New pipeline

New HubSpot dataset

New Azure SQL dataset

New SQL table (Auto Create)

No ForEach activity

No dynamic parameters

No metadata-driven pipeline

No imported mapping

Auto Mapping

Default Type Conversion

Custom DateTime Format (yyyy-MM-ddTHH:mm:ss.fffZ)

Every test produced exactly the same result.

Observation

It appears the native HubSpot connector attempts to convert:

"" -> DateTime

instead of treating the empty string as NULL.

Because the exception occurs before any rows are written to SQL Server, it appears the failure happens during the connector's internal type conversion rather than during SQL insertion.

My Questions

Is this a known issue with the Azure Data Factory HubSpot Connector v2?

Is this expected behavior?

Is there any supported way to treat empty strings ("") returned by HubSpot as NULL for DateTime fields?

Is there any connector configuration, mapping option, or Copy Activity setting that can resolve this without switching to the REST connector?

I would appreciate confirmation from the Azure Data Factory engineering team or anyone who has encountered the same behavior.

Thank you.

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


4 answers

Sort by: Most helpful
  1. Neel Prajapati 0 Reputation points
    2026-08-03T06:04:49.7966667+00:00

    @Sina Salam

    I understand that using Mapping Data Flow to replace empty strings with NULL before converting to DateTime would be a valid approach.

    However, according to the Azure Data Factory documentation, the native HubSpot connector supports Copy Activity and Lookup Activity, but it is not available as a source for Mapping Data Flow.

    Could you please clarify how Mapping Data Flow can be used with the native HubSpot connector in this scenario? If there is a supported approach, could you share the configuration or documentation?

    My issue occurs when the connector reads notes_next_activity_date as an empty string ("") and fails during type conversion in Copy Activity.

    Was this answer helpful?

    0 comments No comments

  2. Senthil kumar 1,900 Reputation points
    2026-08-03T05:42:17.16+00:00

    Hi @Neel Prajapati

    for your copy activity alter your database and add column constraints.

    ALTER TABLE YourTable
    ADD CONSTRAINT DF_YourDate DEFAULT (GETDATE()) FOR YourDateColumn;
    
    
    

    or in your derived columns in before sink.

    check is null then pass current date time or set default date time.

    https://learn.microsoft.com/en-us/azure/data-factory/data-flow-date-time-functions

    iif(isNull(yourDate) || trim(yourDate) == "", toTimestamp('1900-01-01 00:00:00'), yourDate) ' default date time.

    iif(isNull(yourDate) || trim(yourDate) == "", currentTimestamp(), yourDate) ' Current date time.

    Thanks.

    Was this answer helpful?


  3. Neel Prajapati 0 Reputation points
    2026-08-03T05:28:45.86+00:00

    Thank you @Sina Salam for your response.

    I understand that using the REST connector is a viable workaround. However, my objective is to understand whether this behavior in the native Azure Data Factory HubSpot Connector v2 is considered a product defect.

    The connector fails during source deserialization when HubSpot returns an empty string ("") for the notes_next_activity_date property, before any mapping or sink transformation can be applied.

    Could you please clarify:

    1. Has the Azure Data Factory team been able to reproduce this issue with the native HubSpot Connector v2?
    2. Is this behavior a known limitation or has it been logged as a product bug?
    3. If it has been logged, is there a bug ID or tracking number that can be shared?
    4. Is a fix planned for a future release of the connector?

    Since the HubSpot API can legitimately return empty values for optional properties, it would be helpful if the native connector treated "" as NULL for nullable DateTime fields instead of failing the entire copy activity.

    Thank you for your assistance.

    Was this answer helpful?

    0 comments No comments

  4. Sina Salam 31,296 Reputation points Volunteer Moderator
    2026-07-31T15:41:56.7566667+00:00

    Hello Neel Prajapati

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your Azure Data Factory HubSpot Connector v2 fails when HubSpot returns empty string ("") for DateTime property notes_next_activity_date

    The best method without overhead is to:

    • Use the Azure Data Factory REST connector for the affected HubSpot contacts load.
    • Retrieve the contacts from the HubSpot CRM API.
    • Land the unmodified API response as raw JSON in Azure Data Lake Storage Gen2.
    • Process all HubSpot pages using paging.next.link.
    • Convert notes_next_activity_date from "" to NULL before applying the DateTime data type.
    • Load valid timestamps into an Azure SQL datetime2 column.
    • Open an Azure Support request for Product Group investigation and permanent correction of the native HubSpot v2 connector.

    The native HubSpot connector supports Copy Activity and Lookup Activity, but its documentation does not provide a setting for converting an empty DateTime string to NULL. The ADF REST connector supports JSON REST sources and pagination, making it the reliable lossless workaround for this scenario. - https://learn.microsoft.com/en-us/answers/questions/5596905/data-factory-copy-activity-is-failing-for-hubspot, https://learn.microsoft.com/en-us/answers/questions/1397849/how-to-connect-to-hubspot-in-adf-using-rest-connec

    After extracting the contacts as raw JSON and normalizing the property before DateTime conversion, contacts with a blank notes_next_activity_date will be stored as SQL NULL, while valid timestamps will remain correctly typed. This restores the production load without waiting for Azure Support.

    Azure Support is not required to implement this workaround. Support is required only to confirm the connector’s internal root cause, engage the Azure Data Factory Product Group, provide a defect tracking ID, and determine when the native connector will be corrected.

    Use the following resources for implementation:

    I hope this is helpful. Please! Do not hesitate to let me know if you have any other questions, steps or clarifications.


    Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.