This is a Singer tap that produces JSON-formatted data following the Singer spec.
tap-ireckonu
works together with any other Singer Target to move data from the iReckonu API to any target destination.
First, make sure Python 3 is installed on your system or follow these installation instructions for Mac or Ubuntu.
This project is set up using Python Poetry. Once cloned and within the project directory, install dependencies with:
poetry install
Requirements to get started are API Credentials in the form of an Username, Password, Client ID and Client Secret.
These are stored in the config.json
file.
# This is where the enviroment variables will go. Things like
# API Keys, Client Ids, Etc
{
"USERNAME": "",
"PASSWORD": "",
"CLIENT_ID": "",
"CLIENT_SECRET": ""
}
If these keys are missing the tap will fail at run time with a warning of missing required keys. Currently the tap is only setup to authenticate against the acceptance endpoint that is listed in the client.py
file.
python3 -m tap_ireckonu.__init__ -c config.json -s state.json --catalog catalog.json > example.json
The above command, when run from a virtual environment with the poetry packages installed, will run the tap. The tap will cycle through the endpoints starting with a beginning date of 2020-10-30 until the current date. In production, subsequent runs will resume from the last date ran. In dev - this feature isn't setup due to state and bookmarking being handled by a SQL Database.
Streams are iterative endpoint calls that loop through paginated endpoints and the records they return, converting them to JSON strings that match the schema of the data returned.
All streams from the Treez API are setup to be Incremental. These are iterated based on the Update field for each table. The update field is then bookmarked for the next stream. (If there is not starting bookmark the beginning sync date is 2020-10-30). All nested tables only go one nest deep - for information beyond that, refer to the individual schema files.
- Primary key fields:
id
- Replication strategy: INCREMENTAL
- Replication based on: Updated daily timestamp (not based on a current field yet)
- Nested Tables:
- Addresses:
- Table Name:
addresses
- Key Field:
id
- Table Name:
- PhoneNumbers:
- Table Name:
phonenumbers
- Key Field:
id
- Table Name:
- External Resources:
- Table Name:
externalresources
- Table Name:
- Attributes:
- Table Name:
attributes
- Key Field:
id
- Table Name:
- Addresses:
- Transformations: none
- Primary key fields:
id
- Replication strategy: INCREMENTAL
- Replication based on: Updated daily timestamp (not based on a current field yet)
- Nested Tables:
- Names:
- Table Name:
names
- Key Field:
id
- Table Name:
- Addresses:
- Table Name:
addresses
- Key Field:
id
- Table Name:
- PhoneNumbers:
- Table Name:
phonenumbers
- Key Field:
id
- Table Name:
- Email Addresses:
- Table Name:
emailaddresses
- Key Field:
id
- Table Name:
- Company
- Table Name: (See Company)
- External Resources:
- Table Name:
externalresources
- Table Name:
- Attributes:
- Table Name:
attributes
- Key Field:
id
- Table Name:
- Data Consents:
- Table Name:
dataconsents
- Key Field:
id
- Table Name:
- Payment Methods:
- Table Name:
paymentmethods
- Key Field:
id
- Table Name:
- Preferences:
- Table Name:
preferences
- Key Field:
id
- Table Name:
- Loyalty Levels:
- Table Name:
loyaltylevels
- Key Field:
id
- Table Name:
- Stay Summaries:
- Table Name:
staysummaries
- Key Field:
id
- Table Name:
- Documents:
- Table Name:
documents
- Key Field:
id
- Table Name:
- Global Stays:
- Table Name:
globalstays
- Table Name:
- Names:
- Transformations: none
- Primary key fields:
id
- Replication strategy: INCREMENTAL
- Replication based on: Updated daily timestamp (not based on a current field yet)
- Nested Tables:
- Addresses:
- Table Name:
addresses
- Key Field:
id
- Table Name:
- Lines:
- Table Name:
lines
- Key Field:
invoicelinecode
- Table Name:
- Addresses:
- Transformations: none
- Primary key fields:
id
- Replication strategy: INCREMENTAL
- Replication based on: Updated daily timestamp (not based on a current field yet)
- Nested Tables:
- Booker:
- Table Name:
booker
- Based on: Person
- Table Name:
- Primary Guest:
- Table Name:
primaryguest
- Based on: Person
- Table Name:
- Rate Plan:
Table Name:
rateplan
- Agency:
- Table Name:
agency
- Based on: Company
- Table Name:
- Company:
- Table Name: (See Company)`
- Source Company
- Table Name:
sourcecompany
- Based on: Company
- Table Name:
- Extra Services
- Table Name:
extraservices
- Key Field:
id
- Table Name:
- Preferences:
- Table Name:
preferences
- Key Field:
id
- Table Name:
- External Resources:
- Table Name:
externalresources
- Table Name:
- Other Linked Persons:
- Table Name:
otherlinkedpersons
- Based on: Person
- Table Name:
- Contacts:
- Table Name:
contacts
- Based on: Person
- Table Name:
- Payment Informations:
- Table Name:
paymentinformations
- Table Name:
- Payment Methods:
- Table Name:
paymentmethods
- Key Field:
id
- Table Name:
- Attributes:
- Table Name:
attributes
- Key Field:
id
- Table Name:
- Booker:
- Transformations: none