Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add file for parameterized api calls #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions parameterized_api_calls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '2.0'
workflow:
tasks:
task_1:
action: civis.import
input:
sync_type: Dbsync
is_outbound: False
source:
credential_id: cred1
Copy link
Member

@mattyb mattyb May 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmatkinson can we make these numbers? credential_id and remote_host_id don't accept strings.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to force them to be numbers in the yml?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
credential_id: cred1
credential_id: 101

remote_host_id: db1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
remote_host_id: db1
remote_host_id: 201

destination:
credential_id: cred2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
credential_id: cred2
credential_id: 102

remote_host_id: db2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
remote_host_id: db2
remote_host_id: 202

syncs:
- source:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section needs to be indented

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either way is valid, I believe.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, gave it whirl - it's valid yaml.

Stylistically I prefer the indentation as it makes it clear the list is a child of syncs.

database_table:
schema: myschema1
table: mytable1
destination:
database_table:
schema: myschema2
table: mytable2