UPDATE: I forgot to add theFLEX_TEMPLATE_PYTHON_SETUP_FILE when launching. Now I get a new error ![]()
gcloud dataflow flex-template build gs://${bucket}/e_commerce_batch.json
–image-gcr-path “${region}-docker.pkg.dev/${proyecto}/${artifact_registry_name}/dataflow/e_commerce_batch:latest”
–sdk-language “PYTHON”
–flex-template-base-image “PYTHON3”
–metadata-file “metadata.json”
–py-path “.”
–py-path “src/”
–py-path “src/processors/”
–env “FLEX_TEMPLATE_PYTHON_PY_FILE=e_commerce_batch.py”
–env “FLEX_TEMPLATE_PYTHON_REQUIREMENTS_FILE=requirements.txt”
–env “FLEX_TEMPLATE_PYTHON_SETUP_FILE=setup.py”
The new error
sales_target_parse is a function declared in src/processors/functions.py. It’s like the main code is not importing the functions in that path.
This is the line 65 in the main file (e_commerce_batch.py):
This is sales_target_parse’s code in src/processors/functions.py
–
Best regards
David Regalado
Web | Linkedin | Cloudskillsboost


