Airbyte: modify last sync start time
Currently unknown how to modify last sync start times. These have been tried without success:
-- Makupa tms_booking jobs
UPDATE
jobs
SET
created_at = '2024-11-12 00:04:37.701348+00',
updated_at = '2024-11-12 00:11:07.970304+00'
FROM
connection, attempts
WHERE
jobs.id = 7536
AND jobs.scope = connection.id::varchar
AND jobs.id = attempts.job_id
RETURNING
jobs.id AS job_id,
connection.name AS connection_name,
jobs.created_at AS jobs_created_at,
jobs.updated_at AS jobs_updated_at;
-- Makupa tms_booking attempts
UPDATE
attempts
SET
created_at = '2024-11-12 00:04:37.799721+00',
updated_at = '2024-11-12 00:11:07.970304+00'
FROM
connection, jobs
WHERE
attempts.job_id = 7536
AND attempts.job_id = jobs.id
RETURNING
jobs.id AS job_id,
connection.name AS connection_name,
jobs.config_type,
attempts.id AS attempts_id,
attempts.created_at AS attempts_created_at,
attempts.updated_at AS attempts_updated_at;
-- Makupa tms_booking state
UPDATE
state
SET
updated_at = '2024-11-12 00:10:12.23107+00'
FROM
attempts, connection, jobs
WHERE
jobs.id = 7536
AND state.id = '942a78aa-a5a3-4097-ad6b-66a3cd6d7006'
AND state.connection_id = connection.id
AND jobs.id = attempts.job_id
RETURNING
jobs.id AS job_id,
connection.id AS connection_id,
connection.name AS connection_name,
jobs.status,
jobs.created_at AS jobs_created_at,
jobs.updated_at AS jobs_updated_at,
attempts.id AS attempts_id,
attempts.job_id AS attempts_job_id,
attempts.created_at AS attempts_created_at,
attempts.updated_at AS attempts_updated_at,
state.id AS state_id,
state.connection_id AS state_connection_id,
state.updated_at AS state_updated_at;
Last sync times still do not follow the previous sync times
SELECT query:
SELECT
jobs.id AS job_id,
connection.id AS connection_id,
connection.name AS connection_name,
jobs.status,
jobs.created_at AS jobs_created_at,
jobs.updated_at AS jobs_updated_at,
attempts.id AS attempts_id,
attempts.job_id AS attempts_job_id,
attempts.created_at AS attempts_created_at,
attempts.updated_at AS attempts_updated_at,
state.id AS state_id,
state.connection_id AS state_connection_id,
state.created_at AS state_updated_at,
state.updated_at AS state_updated_at
FROM
jobs
JOIN
connection
ON
jobs.scope = connection.id::varchar
JOIN
attempts
ON
jobs.id = attempts.job_id
JOIN
state
ON
state.connection_id = connection.id
WHERE
connection.name LIKE 'Makupa%'
ORDER BY
jobs.created_at DESC
-- using limit here to get the latest booking, fleet, planners and reports. Use a proper limit for your use case.
LIMIT 3;