Skip to content

Feat: Auto select a cursor value incase of default Incremental sync mode #976

@vaibhav-datazip

Description

@vaibhav-datazip

Problem

Currently when a source doesn't support CDC sync the default sync mode is set as incremental in streams.json . And the cursor field which is used to track new records is set to blank in that case, so that user can select the best suited field for it. But if the user forgets to add any cursor field in it, this will give an error as shown below

"message":"error occurred while reading records: failed to run incremental sync: backfill failed: failed to fetch max cursor values: failed to scan primary cursor value: ERROR: zero-length delimited identifier at or near \"\"\"\" (SQLSTATE 42601)"}

This can lead to problem in olake ui as well. When someone dosen't click the stream even once while creating a job the cursor field won't get populated from ui side, as the streams.json sends it empty.

Solution

Select the available cursor fields 0th value and set it as cursor field while generating the streams.json

Metadata

Metadata

Assignees

Labels

beginnereasy issues for beginner contributorsgood first issueGood for newcomers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions