How to use the flowetl.operators.add_constraints_operator.AddConstraintsOperator function in flowetl

To help you get started, we’ve selected a few flowetl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Flowminder / FlowKit / flowetl / flowetl / flowetl / util.py View on Github external
filename=filename,
                mode="reschedule",
                poke_interval=flux_check_poke_interval,
                flux_check_interval=flux_check_wait_interval,
                timeout=flux_check_timeout,
            )
        else:
            check_not_in_flux = TableFluxSensor(
                task_id="check_not_in_flux",
                mode="reschedule",
                poke_interval=flux_check_poke_interval,
                flux_check_interval=flux_check_wait_interval,
                timeout=flux_check_timeout,
            )

        add_constraints = AddConstraintsOperator(
            task_id="add_constraints", pool="postgres_etl"
        )
        add_indexes = CreateIndexesOperator(
            task_id="add_indexes", index_columns=indexes, pool="postgres_etl",
        )
        attach = AttachOperator(task_id="attach")
        analyze = AnalyzeOperator(
            task_id="analyze", target="{{ extract_table }}", pool="postgres_etl",
        )
        latest_only = LatestOnlyOperator(task_id="analyze_parent_only_for_new")
        analyze_parent = AnalyzeOperator(
            task_id="analyze_parent", target="{{ parent_table }}", pool="postgres_etl",
        )
        update_records = UpdateETLTableOperator(task_id="update_records")

        create_staging_view >> check_not_empty >> check_not_in_flux >> extract