Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
airflow-provider-census
Advanced tools
This package allows you to trigger syncs for Census.
Install the airflow-provider-census package from PyPI using your preferred way of installing python packages.
There are 2 ways to configure a Census connection depending on whether you are using Airflow 1.10 or Airflow 2.
The CensusHook
and CensusOperator
use the census_default
connection id as a default, although this is configurable if you would like to use your own connection id.
In the Airflow Connections UI, create a new connection:
In the Airflow Connections UI, create a new connection:
CensusHook
is a class that inherits from HttpHook
and can be used to run http requests for Census.
You will most likely interact with the operator rather than the hook.
The hook can be imported by the following code:
from airflow_provider_census.hooks.census import CensusHook
CensusOperator
triggers a sync job in Census. The operator takes the following parameters:
The operator can be imported by the following code:
from airflow_provider_census.operators.census import CensusOperator
CensusSensor
polls a sync run in Census. The sensor takes the following parameters:
The sensor can be imported by the following code:
from airflow_provider_census.sensors.census import CensusSensor
The following example will run a Census sync once a day:
from airflow_provider_census.operators.census import CensusOperator
from airflow_provider_census.sensors.census import CensusSensor
from airflow import DAG
from airflow.utils.dates import days_ago
from datetime import timedelta
default_args = {
"owner": "airflow",
"start_date": days_ago(1)
}
dag = DAG('census', default_args = default_args)
sync = CensusOperator(sync_id = 27, dag = dag, task_id = 'sync')
sensor = CensusSensor(sync_run_id = "{{ ti.xcom_pull(task_ids = 'sync') }}", dag = dag, task_id = 'sensor')
sync >> sensor
Source code available on Github. Feedback and pull requests are greatly appreciated. Let us know if we can improve this.
:wave: The folks at Census originally put this together. Have data? We'll sync your data warehouse with your CRM and the customer success apps critical to your team.
You can always contact us via support@getcensus.com or in-app via the live chat in the bottom right corner.
FAQs
A Census provider for Apache Airflow.
We found that airflow-provider-census demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.