<@U04S8PLJWMT> I am getting a `"Cursor field is no...
# ask-ai
c
@kapa.ai I am getting a
"Cursor field is not selected properly for stream: Contact. Please include the cursor field in selected fields for this stream."
error when using
incremental_append
on with a
"cursorField": [ "LastModifiedDate"],
and also tried to add it to
selectedFields
as well but that didn't work, anyone has an idea of what the fix could be?
k
The error message
"Cursor field is not selected properly for stream: Contact. Please include the cursor field in selected fields for this stream."
typically means that Airbyte requires the cursor field (in your case,
LastModifiedDate
) to be explicitly included in the list of
selectedFields
for the stream when using incremental sync. From the knowledge sources, there is a similar issue reported when using S3 as a source, where users encountered errors unless the cursor field was included in
selectedFields
. However, even after including the cursor field, the error persisted, suggesting there may be a bug or limitation in how Airbyte handles
selectedFields
in combination with cursor fields for certain connectors or configurations. The workaround attempted was to ensure the cursor field is both set as the
cursorField
and included in
selectedFields
, but this did not resolve the issue for the user in the S3 source scenario. The issue was escalated as a potential bug in Airbyte ([selectFields on Connector using S3 as source is failing](https://github.com/airbytehq/airbyte/issues/48053)). What you should try: - Double-check that the field name in
selectedFields
matches exactly (case-sensitive) the field used in
cursorField
. - Ensure that the field exists in the stream schema and is not nested or misspelled. - If you have already done the above and the error persists, it is possible you are encountering a similar bug or limitation as described in the S3 source issue. Next steps: - If you are certain your configuration is correct and the error still occurs, this may be a bug or unsupported scenario in Airbyte. You may want to open an issue on the Airbyte GitHub or check for existing issues related to your connector and the use of
selectedFields
with incremental sync and cursor fields. Unfortunately, the knowledge sources do not provide a definitive fix beyond these steps, and the issue may require attention from the Airbyte development team if the standard configuration does not work as expected.
A message from kapa.ai
Based on the knowledge sources, this error typically means Airbyte requires the cursor field (e.g.,
LastModifiedDate
) to be explicitly included in the
selectedFields
for the stream when using incremental sync. Users have reported that even after adding the cursor field to both
cursorField
and
selectedFields
, the error can persist. This has been observed as a potential bug or limitation, especially when using certain sources or configurations. What you should check: - Ensure the field name in
selectedFields
matches exactly (including case) the field in
cursorField
. - Make sure the cursor field exists in the stream schema and is not nested or misspelled. - If you are using a source or destination that has known issues with
selectedFields
and cursor fields (such as S3 or Salesforce), be aware that this may be a product limitation or bug. For example, a similar issue was reported and discussed in [this GitHub issue](https://github.com/airbytehq/airbyte/issues/48053). If you have already verified the above and the error still occurs, it is likely a bug or unsupported scenario in Airbyte. In such cases, the best course of action is to open an issue on the Airbyte GitHub or check for updates on existing issues related to your connector and the use of
selectedFields
with incremental sync and cursor fields. The knowledge sources do not provide a definitive fix beyond these steps, and this scenario may require attention from the Airbyte development team if the standard configuration does not work as expected.
c
@kapa.ai Right but
LastModifiedDate
is present in the request payload:
Copy code
{
  "name": "import_job_id",
  "sourceId": "dh78b8e0-314z-4dey-bc14-fe1365c7b5e0",
  "destinationId": "1ad4ef1a-bceb-493y-a08e-z00766607db1",
  "dataResidency": "eu",
  "namespaceDefinition": "custom_format",
  "namespaceFormat": "1234_job_id",
  "prefix": "contacts_",
  "schedule": {
    "scheduleType": "manual"
  },
  "configurations": {
    "streams": [
      {
        "name": "Contact",
        "syncMode": "incremental_append",
        "cursorField": [
          "LastModifiedDate"
        ],
        "selectedFields": [
          {
            "fieldPath": [
              "Email"
            ]
          },
          {
            "fieldPath": [
              "Fax"
            ]
          },
          {
            "fieldPath": [
              "Phone"
            ]
          },
          {
            "fieldPath": [
              "Title"
            ]
          },
          {
            "fieldPath": [
              "FirstName"
            ]
          },
          {
            "fieldPath": [
              "LastName"
            ]
          },
          {
            "fieldPath": [
              "MobilePhone"
            ]
          },
          {
            "fieldPath": [
              "LastModifiedDate"
            ]
          }
        ]
      }
    ]
  }
}
k
A message from kapa.ai
You are correct that your request payload includes
LastModifiedDate
in both the
cursorField
and as a
selectedField
. According to Airbyte documentation, this is the required approach: when using incremental sync, the cursor field must be included in the list of selected fields, and it cannot be deselected if the sync mode requires it. This is explicitly stated in the documentation: > It is not possible to deselect a primary key or cursor if your selected sync mode requires it to sync. > — [Configuring Schemas: Select Fields](https://docs.airbyte.com/platform/using-airbyte/configuring-schema#select-fields) If you are still receiving the error
"Cursor field is not selected properly for stream: Contact. Please include the cursor field in selected fields for this stream."
despite following this guidance, it may indicate a bug or limitation with the connector or Airbyte platform itself. This is supported by a similar issue reported by other users, where including the cursor field in both places did not resolve the error, and it was suggested to be a product issue ([see related GitHub issue](https://github.com/airbytehq/airbyte/issues/48053)). Summary: - Your configuration matches the documented requirements. - If the error persists, it is likely a bug or unsupported scenario. - The knowledge sources do not provide a workaround beyond what you have already tried. Recommendation: If you have confirmed the field names are correct and match the schema, and the error still occurs, you should open an issue with Airbyte or check for updates on existing issues for your connector and this sync mode, as the knowledge sources do not provide a further solution.