Package: tap-dayforce
tap-dayforceASingertap for extracting data from theDayforce REST API v1.InstallationSince package dependencies tend to conflict between various taps and targets, Singerrecommendsinstalling taps and targets into their own isolated virtual environments:Install Dayforce Tap$python3-mvenv~/.venvs/tap-dayforce
$source~/.venvs/tap-dayforce/bin/activate
$pip3installtap-dayforce
$deactivateInstall Stitch Target (optional)$python3-mvenv~/.venvs/target-stitch
$source~/.venvs/target-stitch/bin/activate
$pip3installtarget-stitch
$deactivateConfigurationThe tap accepts a JSON-formatted configuration file as arguments. This configuration file has four required fields:username: A valid Dayforce web services user account username.password: A valid Dayforce web services user account password.client_namespace: A valid client name (e.g. Company Name) that will be inserted into the request URL.start_date: A date to fall back on when nostate.jsonis provided. This determines how far back the tap looks for data within the Dayforce platform.It's important to note that the Role attached to the User Account used in the configuration file must have at minimum the "Web Services" feature, as well as the "Read Data" sub-feature enabled.An bare-bones Dayforce configuration may file may look like the following:{"username":"foo","password":"bar","client_namespace":"foo_bar","start_date":"2019-01-01T00:00:00Z"}StreamsThe current version of the tap syncs four distinctStreams:Employees:Endpoint DocumentationEmployeePunches:Endpoint DocumentationEmployeeRawPunchesEndpoint DocumentationPaySummaryReportEndpoint DocumentationDiscoverySinger taps describe the data that a stream supports via aDiscoveryprocess. You can run the Dayforce tap in Discovery mode by passing the--discoverflag at runtime:$~/.venvs/tap-dayforce/bin/tap-dayforce--config=config/dayforce.config.json--discoverThe tap will generate aCatalogto stdout. To pass the Catalog to a file instead, simply redirect it to a file:$~/.venvs/tap-dayforce/bin/tap-dayforce--config=config/dayforce.config.json--discover>catalog.jsonDiscovery mode will not select all streams for replication by default. To instruct Discovery mode to select all streams for replication, use the--select-allflag:$~/.venvs/tap-dayforce/bin/tap-dayforce--config=config/dayforce.config.json--discover--select-all>catalog.jsonSync to stdoutRunning a tap inSync modewill extract data from the various selected Streams. In order to run a tap in Sync mode and have messages emitted to stdout, pass a valid configuration file and catalog file:$~/.venvs/tap-dayforce/bin/tap-dayforce--config=config/dayforce.config.json--catalog=catalog.jsonThe tap will emit occasionalMetric,Schema,Record, andState messages. You can persist State between runs by redirecting messages to a file:$~/.venvs/tap-dayforce/bin/tap-dayforce--config=config/dayforce.config.json--catalog=catalog.json>>state.json
$tail-1state.json>state.json.tmp
$mvstate.json.tmpstate.jsonSync to StitchYou can also send the output of the tap toStitch Datafor loading into the data warehouse. To do this, first create a JSON-formatted configuration for Stitch. This configuration file has two required fields:client_id: The ID associated with the Stitch Data account you'll be sending data to.token: The token associated with the specificImport API integrationwithin the Stitch Data account.small_batch_url: Default to "https://api.stitchdata.com/v2/import/batch"big_batch_url: Default to "https://api.stitchdata.com/v2/import/batch"batch_size_preferences: Default to{}An example configuration file will look as follows:{"token":"foobar","client_id":12345,"small_batch_url":"https://api.stitchdata.com/v2/import/batch","big_batch_url":"https://api.stitchdata.com/v2/import/batch","batch_size_preferences":{}}Once the configuration file is created, simply pipe the output of the tap to the Stitch Data target and supply the target with the newly created configuration file:$~/.venvs/tap-dayforce/bin/tap-dayforce--config=config/dayforce.config.json--catalog=catalog.json--state=state.json|~/.venvs/target-stitch/bin/target-stitch--config=config/stitch.config.json>>state.json
$tail-1state.json>state.json.tmp
$mvstate.json.tmpstate.jsonContributingThe first step to contributing is getting a copy of the source code. First,forktap-dayforceon GitHub. Then,cdinto the directory where you want your copy of the source code to live and clone the source code:$cdrepos
$gitclonegit@github.com:YourGitHubName/tap-dayforce.gitNow that you have a copy of the source code on your machine, create and activate a virtual envionment fortap-dayforce:$python3-mvenv~/.venvs/tap-dayforce
$source~/.venvs/tap-dayforce/bin/activateOnce inside the virtual environment, runmake dev_installat the root of the repository:$(tap-dayforce)makedev_installRun thetoxtesting suite in the appropriate python environment to ensure things are working properly:$(tap-dayforce)tox-epy37To format your code usingisortandflake8before commiting changes, run the following commands:$(tap-dayforce)makeisort
$(tap-dayforce)makeflake8Once you've confirmed that your changes work and the testing suite passes, feel free to put out a PR!