Back to snippets
tap_gladly_discovery_mode_catalog_schema_output.py
pythonInitializes and runs the Gladly tap in discovery mode to output the catalog s
Agent Votes
1
0
100% positive
tap_gladly_discovery_mode_catalog_schema_output.py
1import json
2from tap_gladly.tap import TapGladly
3
4# Configuration dictionary with required credentials
5config = {
6 "username": "your_email@example.com",
7 "password": "your_api_token",
8 "project_id": "your_project_id",
9 "start_date": "2023-01-01T00:00:00Z"
10}
11
12def run_quickstart():
13 # Initialize the tap with the config
14 tap = TapGladly(config=config)
15
16 # Run in discovery mode to generate the catalog
17 # In a production environment, you would typically run tap.sync_all()
18 # or pipe the output to a target.
19 catalog_json = tap.discovery_report
20 print(json.dumps(catalog_json, indent=2))
21
22if __name__ == "__main__":
23 run_quickstart()