singer-io / tap-doubleclick-campaign-manager

A Singer.io tap for extracting data from the DoubleClick Campaign Manager API
GNU Affero General Public License v3.0
4 stars 16 forks source link

Safely get keys from dictionary with default values in a case when us… #18

Open cenxiao opened 3 years ago

cenxiao commented 3 years ago

The tap discover step scans all the report that in user's account and generate a catalog. If there is a Campaign Manager report that doesn't have any metrics, Tap's discovery phase end up failing by complaining about that non-existing key.

Description of change

Safely get the key from a dictionary with a default value will fix this issue.

Manual QA steps

  1. Create a report in Google Campaign Manager 360, remove all the metrics
  2. Run tap-doubleclick-campaign-manager -c config.json --discover

Risks

None

Rollback steps