Skip to content

Instantly share code, notes, and snippets.

@toru-takahashi
Created February 10, 2018 04:15
Show Gist options
  • Save toru-takahashi/d0f3b9487d31bb7b266f3bc134d1bcc9 to your computer and use it in GitHub Desktop.
Save toru-takahashi/d0f3b9487d31bb7b266f3bc134d1bcc9 to your computer and use it in GitHub Desktop.
example.yml
in:
type: td
apikey: xxxxx
endpoint: api.treasuredata.com
database: zendesk
query: |
SELECT
id, -- Zendesk UserID
MAP_CONCAT(
MAP(ARRAY[cast('sfdc_company_name' AS VARCHAR)], ARRAY[cast(sfdc_company_name AS VARCHAR)]),
MAP(ARRAY[cast('sfdc_subscription_status' AS VARCHAR)], ARRAY[cast(sfdc_subscription_status AS VARCHAR)]),
...
)
FROM xxxx LEFT JOIN yyyy ON xxxx.email = yyyy.email
out:
type: zendesk_users
login_url: https://xxxxx.zendesk.com
auth_method: token
username: xxxxx
token: xxxxx
method: update
id_column: id
user_fields_column: user_fields
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment