def start_proxy(self):
self._download_sql_proxy_if_needed()<EOL>if self.sql_proxy_process:<EOL><INDENT>raise AirflowException("<STR_LIT>".format(<EOL>self.sql_proxy_process))<EOL><DEDENT>else:<EOL><INDENT>command_to_run = [self.sql_proxy_path]<EOL>command_to_run.extend(self.command_line_parameters)<EOL>try:<EOL><INDENT>self.log.info("<STR_LIT>",<EOL>self.cloud_sql_proxy_socket_directory)<EOL>os.makedirs(self.cloud_sql_proxy_socket_directory)<EOL><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>command_to_run.extend(self._get_credential_parameters())<EOL>self.log.info("<STR_LIT>", "<STR_LIT:U+0020>".join(command_to_run))<EOL>self.sql_proxy_process = Popen(command_to_run,<EOL>stdin=PIPE, stdout=PIPE, stderr=PIPE)<EOL>self.log.info("<STR_LIT>", self.sql_proxy_process.pid)<EOL>while True:<EOL><INDENT>line = self.sql_proxy_process.stderr.readline().decode('<STR_LIT:utf-8>')<EOL>return_code = self.sql_proxy_process.poll()<EOL>if line == '<STR_LIT>' and return_code is not None:<EOL><INDENT>self.sql_proxy_process = None<EOL>raise AirflowException(<EOL>"<STR_LIT>".format(<EOL>return_code))<EOL><DEDENT>if line != '<STR_LIT>':<EOL><INDENT>self.log.info(line)<EOL><DEDENT>if "<STR_LIT>" in line or "<STR_LIT>" in line:<EOL><INDENT>self.stop_proxy()<EOL>raise AirflowException(<EOL>"<STR_LIT>".format(<EOL>line))<EOL><DEDENT>if "<STR_LIT>" in line:<EOL><INDENT>return<EOL><DEDENT><DEDENT><DEDENT>
Starts Cloud SQL Proxy.

You have to remember to stop the proxy if you started it!