guilherme_petris
04/18/2023, 2:50 PM{
"singer_state": {
"bookmarks": {
"public-chargeable_items": {
"field": "time",
"last_record": "2023-04-10T00:00:00Z"
}
}
}
}
meltano state set --force core-aws:tap-postgres-to-target-jsonl-transactional --input-file /path_to_file/testfile.json
when i try to run it meltano can’t identify the state and will start to load everything. I don’t know what i’m missing here. Any hints?anthony_shook
04/18/2023, 3:10 PM{
"singer_state": {
"bookmarks": {
"public-table_name": {
"last_replication_method": "INCREMENTAL",
"replication_key": "id",
"version": 1679511215154,
"replication_key_value": 140
}
},
"currently_syncing": null
}
pat_nadolny
04/18/2023, 3:36 PM{
"singer_state": {
"bookmarks": {
"public-newtable": {
"replication_key": "key",
"replication_key_value": 3
}
}
}
}
where my meltano.yml looks like:
select:
- public-newtable.*
metadata:
metadata:
public-newtable:
replication-method: INCREMENTAL
replication_key: key
key_properties:
- key
so the replication key is key
and the most recent value found is 3
guilherme_petris
04/19/2023, 8:18 AMguilherme_petris
04/19/2023, 12:18 PMpat_nadolny
04/19/2023, 1:26 PMcan’t find any of those bookmarks patterns anywhere in documentation.@guilherme_petris yeah it looks like youre right. Would you mind creating an issue to document your experience? It would probably be helpful to document some examples like we provided and how to get/set them and maybe if theres a pattern for generating your own state file (e.g. I'm thinking maybe tricks like recommending doing a small 1 day sync if theres a
start_date
parameter then manipulating the state from there 🤷).anthony_shook
04/19/2023, 2:23 PMmeltano state init
command, or something like it, that generates the state for existing target tables.
Number of ways to do this (I’ve done it myself in a hardcoded way), but Meltano already knows the targets and how to check if they exist, whether the table is intended to be incremental, the column for checking state, etc, so it seems like all the necessary information is already available, even without actually committing any writes to the target.pat_nadolny
04/19/2023, 2:30 PMpat_nadolny
04/19/2023, 2:31 PManthony_shook
04/19/2023, 2:37 PManthony_shook
04/19/2023, 2:39 PM