For every star on GitHub, we'll donate $2 to clean up our waterways. Star us now!
if __name__ == "__main__":
# TapCustomExtractor is the class name of your tap in tap.py
TapCustomExtractor.cli()
If you’re using Poetry you need to create a venv in your custom tap directory so that your IDE can pick it up when debugging.
If you have already installed poetry this will involve removing the existing poetry virtual environment. Running the command below and finally reinstalling poetry.
poetry config virtualenvs.in-project true
Add the following launch configuration to your project:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
# Replace tap_foobar below with the actual name of your custom extractors library
"program": "${workspaceRoot}/tap_foobar/tap.py",
"console": "integratedTerminal",
"args": ["--config", ".secrets/config.json"],
"env": { "PYTHONPATH": "${workspaceRoot}"},
# Change this to false if you wish to debug and add breakpoints outside of your code e.g. the singer-sdk package
"justMyCode": true
}
]
}
The above launch.json specifies the location of this config as .secrets/config.json
.
Feel free to change this but ensure the config has all the required config fields for your custom extractor to run successfully.
You should now be able to add breakpoints where you need and run the debugger.