Overview
Creating a resource requires mutations, because it modifies data on the server rather than only reading it. Create a credential, and use that credential to infer the schema for a given dataset. Then, use the credential and schema to create a source.Steps
1
Create a credential
Create a credential and pass the input as a dictionary. The type-specific fields (the GCP service account credential and the catalog flag) go under
config.gcp. Cross-reference the API documentation to see which variables CredentialCreateInput expects and requires.2
Infer the schema
Instead of writing out the schema for the source by hand, have Validio infer it. This is what happens under the hood when you set up a source in the UI.
3
Create the source
Create a source with the credential from the first step and the schema inferred in the second step. The type-specific fields (project, dataset, table, and schedule) go under
config.gcpBigQuery. Pass all the values for SourceCreateInput to create the source.Full code sample
Python