Esempio n. 1
0
 def execute(
     self,
     operation,
     parameters=None,
     work_group=None,
     s3_staging_dir=None,
     cache_size=0,
     keep_default_na=False,
     na_values=None,
     quoting=1,
 ):
     self._reset_state()
     self._query_id = self._execute(
         operation,
         parameters=parameters,
         work_group=work_group,
         s3_staging_dir=s3_staging_dir,
         cache_size=cache_size,
     )
     query_execution = self._poll(self._query_id)
     if query_execution.state == AthenaQueryExecution.STATE_SUCCEEDED:
         self._result_set = AthenaPandasResultSet(
             connection=self._connection,
             converter=self._converter,
             query_execution=query_execution,
             arraysize=self.arraysize,
             retry_config=self._retry_config,
             keep_default_na=keep_default_na,
             na_values=na_values,
             quoting=quoting,
         )
     else:
         raise OperationalError(query_execution.state_change_reason)
     return self
 def _collect_result_set(self, query_id):
     query_execution = self._poll(query_id)
     return AthenaPandasResultSet(connection=self._connection,
                                  converter=self._converter,
                                  query_execution=query_execution,
                                  arraysize=self._arraysize,
                                  retry_config=self._retry_config)
Esempio n. 3
0
 def execute(self, operation, parameters=None):
     self._reset_state()
     self._query_id = self._execute(operation, parameters)
     query_execution = self._poll(self._query_id)
     if query_execution.state == AthenaQueryExecution.STATE_SUCCEEDED:
         self._result_set = AthenaPandasResultSet(self._connection,
                                                  self._converter,
                                                  query_execution,
                                                  self.arraysize,
                                                  self._retry_config)
     else:
         raise OperationalError(query_execution.state_change_reason)
     return self
Esempio n. 4
0
 def execute(self, operation, parameters=None):
     self._reset_state()
     self._query_id = self._execute(operation, parameters)
     query_execution = self._poll(self._query_id)
     if query_execution.state == AthenaQueryExecution.STATE_SUCCEEDED:
         self._result_set = AthenaPandasResultSet(
             self._connection, self._converter, query_execution,
             self.arraysize, self.retry_exceptions, self.retry_attempt,
             self.retry_multiplier, self.retry_max_delay,
             self.retry_exponential_base)
     else:
         raise OperationalError(query_execution.state_change_reason)
     return self
Esempio n. 5
0
 def execute(self, operation, parameters=None, work_group=None, s3_staging_dir=None,
             cache_size=0):
     self._reset_state()
     self._query_id = self._execute(operation,
                                    parameters=parameters,
                                    work_group=work_group,
                                    s3_staging_dir=s3_staging_dir,
                                    cache_size=cache_size)
     query_execution = self._poll(self._query_id)
     if query_execution.state == AthenaQueryExecution.STATE_SUCCEEDED:
         self._result_set = AthenaPandasResultSet(
             self._connection, self._converter, query_execution, self.arraysize,
             self._retry_config)
     else:
         raise OperationalError(query_execution.state_change_reason)
     return self
 def _collect_result_set(
     self,
     query_id,
     keep_default_na=False,
     na_values=None,
     quoting=1,
 ):
     query_execution = self._poll(query_id)
     return AthenaPandasResultSet(
         connection=self._connection,
         converter=self._converter,
         query_execution=query_execution,
         arraysize=self._arraysize,
         retry_config=self._retry_config,
         keep_default_na=keep_default_na,
         na_values=na_values,
         quoting=quoting,
     )