0

I have a dataflow template that I schedule or trigger using a Google Cloud Scheduler. We change the job quite often during development that involves changes to the arguments as well. Quite often we find that trigger fails with status 400 and INVALID_ARGUMENT. Since there are multiple arguments it becomes difficult to figure which argument that is passed is invalid.

Is there a better way to figure out which argument is causing the trigger to fail rather than manual?

Nibrass H
  • 2,403
  • 1
  • 8
  • 14

1 Answers1

0

From the Common error guidance: Bad error you can not see in Stackdirver those arguments.

If it written in Python you can expose the arguments using logging:

# import Python logging module.
import logging

class ExtractWordsFn(beam.DoFn):

  def process(self, *arg, **kwarg):
    logging.info('Arguments: %s', arg)
    logging.info('Key-value args: %s', kwarg)
    my,arguments = arg
    # REST OF YOUR CODE
Juancki
  • 1,793
  • 1
  • 14
  • 21