title: How to add a flow as a dependency for an Azkaban job using the Azkaban Python API?
body: <p>I have a job A which needs to invoke an Azkaban flow "F" as a dependency. How do I mention the dependency of Job A on Flow F?</p>
  
  <p>Here is what I have right now related to getting the remotely stored flow "F":</p>
  
  <pre><code>session = remote.Session("user@https://AZKABANURL")
  workflows = session.get_workflows("FlowFProjectName")
  flows = workflows[u"flows"]
  flow_id = flows[0]["flowId"]
  
  workflows = session.get_workflow_info("FlowFProjectName", flow_id)
  node_id = workflows["nodes"][0]["id"]
  </code></pre>
  
  <p>Now that I have the node_id which is the name of the last job in Flow F, how do I add a dependency of flow F in a job A? Is it like so?</p>
  
  <pre><code>jobs["A"] = {
      "type": "command", 
      "command": 'echo "Hello World"', 
      "dependencies": "F"
  }
  </code></pre>
  
  <p>Doing the following gives me an error on uploading to Azkaban (by bundling this job A inside a project):</p>
  
  <p><code>jobs["a"] = Job({"type": "command", "command": 'echo "Hello World"',"dependencies": node_id})</code></p>
  
  <p>This is the error:</p>
  
  <pre><code>azkaban.util.AzkabanError: Installation Failed.
  Error found in upload. Cannot upload.
  a cannot find dependency &lt;node_id&gt;
  </code></pre>
  
  <p>Here, node_id is the actual name of the job which I have obscured.</p>
  
  <p>Could someone advise me on adding these dependencies on external flows  inside a job? The external flow is on Azkaban (which is why I have to use Azkaban.remote).</p>