https://linen.dev logo
#contributing-to-airbyte
Title
# contributing-to-airbyte
b

Boggdan Barrientos

12/28/2021, 11:45 PM
Hi all, I currently want to change my cursor value, I access to the airbyte database and find my job in the tables jobs. I identify it by id or by scope. I check that the cursor value is set in a JSON inside config column. The config json looks like the attached in the thread. I was reading in how to change JSON values using
jsonb_set
, I'm writing like, but nothing is updated.
Copy code
UPDATE jobs SET config = jsonb_set(config, '{"sync":{"state"}}'::jsonb, '{"state": {"cdc": false, "streams": [{"cursor": "2021-10-29T00:00:00Z", "stream_name": "PROMOCIONESGENERADAS", "cursor_field": ["Fecha"], "stream_namespace": "CENTRALIZADOR"}]}}', false) WHERE id = 1611;
I think that I'm writting wrong the path, what the correct way to do it? I think that is most a postgres question, but I hope find some guide here. Thanks.
config json
Copy code
{
   "sync":{
      "state":{
         "state":{
            "cdc":false,
            "streams":[
               {
                  "cursor":"2021-10-31T00:00:00Z",
                  "stream_name":"PROMOCIONESGENERADAS",
                  "cursor_field":[
                     "Fecha"
                  ],
                  "stream_namespace":"CENTRALIZADOR"
               }
            ]
         }
      },
      "prefix":"",
      "namespaceFormat":"raw_test",
      "operationSequence":[
         
      ],
      "sourceDockerImage":"airbyte/source-oracle:0.3.8",
      "namespaceDefinition":"customformat",
      "sourceConfiguration":{
         "sid":"stage",
         "host":"****",
         "port":****,
         "schemas":[
            "CENTRALIZADOR"
         ],
         "password":"****",
         "username":"****",
         "encryption":{
            "encryption_method":"unencrypted"
         },
         "tunnel_method":{
            "tunnel_method":"NO_TUNNEL"
         }
      },
      "resourceRequirements":{
         
      },
      "destinationDockerImage":"airbyte/destination-redshift:0.3.20",
      "configuredAirbyteCatalog":{
         "streams":[
            {
               "stream":{
                  "name":"PROMOCIONESGENERADAS",
                  "namespace":"CENTRALIZADOR",
                  "json_schema":{
                     "type":"object",
                     "properties":{
                        "Id":{
                           "type":"number"
                        },
                        "Hora":{
                           "type":"string"
                        },
                        "Fecha":{
                           "type":"string"
                        },
                        "IdCajas":{
                           "type":"number"
                        },
                        "Cantidad":{
                           "type":"number"
                        },
                        "CodigoPago":{
                           "type":"string"
                        },
                        "Generacion":{
                           "type":"string"
                        },
                        "IdEmpresas":{
                           "type":"number"
                        },
                        "IdUsuarios":{
                           "type":"number"
                        },
                        "IdSucursales":{
                           "type":"number"
                        },
                        "IdPromociones":{
                           "type":"number"
                        },
                        "MontoPromocion":{
                           "type":"number"
                        },
                        "IdTransacciones":{
                           "type":"number"
                        },
                        "MontoTransaccion":{
                           "type":"number"
                        },
                        "CantidadPromocion":{
                           "type":"number"
                        },
                        "IdPromocionesCriterios":{
                           "type":"number"
                        }
                     }
                  },
                  "default_cursor_field":[
                     
                  ],
                  "supported_sync_modes":[
                     "full_refresh",
                     "incremental"
                  ],
                  "source_defined_primary_key":[
                     
                  ]
               },
               "sync_mode":"incremental",
               "primary_key":[
                  
               ],
               "cursor_field":[
                  "Fecha"
               ],
               "destination_sync_mode":"append"
            }
         ]
      },
      "destinationConfiguration":{
         "host":"*****",
         "port":5439,
         "schema":"public",
         "database":"raw",
         "password":"******",
         "username":"airbyte_user",
         "access_key_id":"*****",
         "s3_bucket_name":"unibi-airbyte-staging",
         "s3_bucket_region":"*****",
         "secret_access_key":"*****"
      }
   },
   "configType":"sync"
}
u

[DEPRECATED] Marcos Marx

12/29/2021, 12:51 AM
Hope this helps you!
j

Javier Llorente Mañas

12/30/2021, 5:06 PM
Thanks! octavia thanks
3 Views