Skip to content

Add missing hooks to dumped Replication config#34

Merged
flarco merged 1 commit into
slingdata-io:mainfrom
matanper:patch-1
Jun 3, 2025
Merged

Add missing hooks to dumped Replication config#34
flarco merged 1 commit into
slingdata-io:mainfrom
matanper:patch-1

Conversation

@matanper

@matanper matanper commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Example of not working hooks in replication:

import sling


env = {
    'SLING_PG': 'postgresql://postgres@localhost:5432/postgres?sslmode=disable',
}

defaults = {
    'mode': 'full-refresh',
    'object': 'public.{stream_table}_sync',
}

streams = {
    'public.test': sling.ReplicationStream(
        **defaults
    ),
}

hooks = {
    'start':  [{
        'type': 'query',
        'connection': 'SLING_PG',
        'query': 'create table public.test_hook (id int);'
    }]
}

replication = sling.Replication(source='SLING_PG', target='SLING_PG', streams=streams, debug=True, hooks=hooks)
replication.run(env=env)

@matanper matanper changed the title Add missing hooks to dumped config Add missing hooks to dumped Replication config Jun 3, 2025
@flarco flarco merged commit 37e1e12 into slingdata-io:main Jun 3, 2025
@flarco

flarco commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

thanks, releasing 1.4.9.post2 in a bit

@matanper matanper deleted the patch-1 branch June 3, 2025 10:35
@odedva

odedva commented Jun 3, 2025

Copy link
Copy Markdown

👏

@dlibis

dlibis commented Jun 3, 2025

Copy link
Copy Markdown

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants