pateash edited a comment on issue #16911:
URL: https://github.com/apache/airflow/issues/16911#issuecomment-877698788


   found a workaround for though
   ```python
              path = 
f"gs://goog-dataproc-initialization-actions-{self.cfg.get('region')}/python/pip-install.sh"
   
               cluster_config =  ClusterGenerator(
                   project_id=self.cfg.get('project_id'),
                ...........
                   init_actions_uris=[
                       path
                   ],
                   metadata={'PIP_PACKAGES': 'pyyaml requests pandas openpyxl'},
                   properties=properties,
                   dag=dag
               ).make()
   
            return DataprocClusterCreateOperator(
               task_id='create_dataproc_cluster',
               cluster_name='my-cluster',
               project_id=self.cfg.get('project_id'),
               region=self.cfg.get('region'),
               cluster_config=cluster_config,
               dag=dag
           )
   ```
   
   @turbaszek @mik-laj @potiuk , I couldn't able to find an example where i 
will use new metadata field ( changed from DICT to  Sequence[Tuple[str, str]])
    for DataprocClusterCreateOperator() or DataprocCreateClusterOperator() for 
initialisations scripts installing PIP_PACKAGES.
   any time i tried to pass **[('PIP_PACKAGES', 'pyyaml requests pandas 
openpyxl')]** to metadata field, I get invalid metadata.
   How does this supposed to be passed, I couldn't able to find any guide in 
the docs as well?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to