Singer.io tap for extracting FreshWorks CRM Data
Project description
tap_freshworkscrm
This is a Singer tap that produces JSON-formatted data following the Singer spec.
This tap:
-
Pulls raw data from FreshWorks CRM REST API
-
Extracts the following resources:
-
Outputs the schema for each resource
-
Pulls all data
Installation
-
Clone the app
-
Create virtual env
virtualenv testthensource test/bin/activate -
Install dependencies i.e
pip install -e . -
Run Tests
pytest tests
How to run the tap
- Create a config file from the
sample_configalready provided
{
"api_key": "your-api-token",
"domain": "subdomain",
"start_date": "2021-09-26T00:00:00Z"
}
- Run the command below
python tap_freshworkscrm/__init__.py --config config.json >> state.json
- Where state.json - a file where the tap writes all data pulled from freshsales.
If successful, state.json should have this format.
-
STATE :
{ item_id: updated_at }- Adds the bookmapping function where only sync if a record has been updated from previous sync. -
SCHEMA : Generated schema - automates the
Data insertprocess -
RECORD : Actual data for each record in json format.
Running tap to Postgres Database
-
To push data from tap_freshsale to postgres db using the target-postgres
-
Add db_config
{
"host": "localhost",
"port": 5432,
"dbname": "local freshsales db",
"user": "db user",
"password": "db password",
"schema": "tap_freshworkscrm"
}
- Run this command
python your_virtual_env/bin/tap_freshworkscrm --config ../config.json | your_virtual_env/bin/target-postgres -c ../db_config.json
Running tap to Redshift Database
-
To push data from tap_freshsale to Redshift db using the target-redshift
-
Pip install target-redshift -
Add db_config
{
"redshift_username": "username",
"redshift_schema": "tap_freshworkscrm",
"redshift_host": "your redshift.amazonaws.com",
"redshift_password": "password",
"redshift_port": 5439,
"redshift_database": "your db",
"default_column_length": 1000,
"target_s3":{
"aws_access_key_id": "AKIA...",
"aws_secret_access_key": "secrete key",
"bucket": "bucket name",
"key_prefix": "temp_"
}
}
- Run this command
python your_virtual_env/bin/tap_freshworkscrm --config ../config.json | your_virtual_env/bin/target-redshift -c ../db_config.json
Since python2.7 has been deprecated, you might have to
pip3 install target-redshiftor copy the target-redshift file toyour_env/bin/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tap-freshworkscrm-0.1.0.tar.gz.
File metadata
- Download URL: tap-freshworkscrm-0.1.0.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40d8304c87bc604c38b2b4e734384b48cf18e29f878baedf6fba1b4cfeb29b34
|
|
| MD5 |
f77b82dfffffa95af6c0335bf3c6c75f
|
|
| BLAKE2b-256 |
1f78ba23e1d84d4c45e91c934bee077299a566e7d185ed0700e2c19ef01d9b99
|
File details
Details for the file tap_freshworkscrm-0.1.0-py3.8.egg.
File metadata
- Download URL: tap_freshworkscrm-0.1.0-py3.8.egg
- Upload date:
- Size: 19.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de874e88c92f02758b518cf00278d78d7943da10ed0adbbe08f95a4051e6e84
|
|
| MD5 |
378877c6b281595c9f2cc480140d3796
|
|
| BLAKE2b-256 |
32fbba506072770481828e95fdc17c51a838b908d176fdd337e892ef6d6e71dd
|
File details
Details for the file tap_freshworkscrm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tap_freshworkscrm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
beaf4446c07e0b2f06fccf8e860ead440addd399ee77d3b4ce755790ee9442c8
|
|
| MD5 |
62339c58a679416f5322f1d6facdef6d
|
|
| BLAKE2b-256 |
e72bfbf33c37e655f5bc3bb48eb0226c66e6d60d5aa7a37fe3ff26fb70ccf248
|