title: Downloading table data as CSV to local machine in Big query
body: <pre><code>def downloadGbqToCsv(self,table_name,csv):
  
          credentials = GoogleCredentials.get_application_default()
      bigquery = discovery.build('bigquery', 'v2', credentials=credentials)
  
          job_data = {
          'sourceTable': {
                      'projectId': self.project_id,
                      'datasetId': self.dataset_id,
                      'tableId': table_name,
                  },
                  'destinationUris': 'path/to/download',
                  'destinationFormat': 'CSV',
                  'compression': 'NONE'
          }
  
  
          start = time.time()
          job_id = 'job_%d' % start
          # Create the job.
  
          result = bigquery.jobs().insert(projectId=self.project_id,body=job_data).execute()
  
          return result
  </code></pre>
  
  <p>How can I download the table data in CSV to my local machine?</p>