I want to write a GAE application that gets the data fom my MSSQL server, that will be converted and stored in GAEs cloud db, and used for some other processes.
Is there any possibility for that? I could not find any info about connecting form gae to mssql and query data.
I found Bulk Loader but dont think it has any use for me. And also this page killed my hopes about this, looks like it has no windows support.
I used pyodbc to connect my MSSQL server, using this code lines;
con = pyodbc.connect("DRIVER={SQL Server}; SERVER=my_server_ip; DATABASE=db_name; UID=user_id; PWD=password; CHARSET=UNICODE")
cur = con.cursor()
(First I wrote some more code to convert database tables into CSV files then uploaded them.)
Afterwards I used bulkloader to upload and download from tables. Bulkloader documentation is lack of examples tho. I wrote this code to upload and download via os library that provides dos commands to work in script. Provided CSV files to upload from the file I stored them after conversion.
Upload:
os.system("appcfg.py upload_data --config_file=bulkloader.yaml --log_file=/logs --url=http://my_app_name.appspot.com/_ah/remote_api --kind=kind --filename=CSV_files/table_name.csv --email=my_email_adress)
Download:
os.system("bulkloader.py --download --config_file=bulkloader.yaml --kind=kind --url=http://my_app_name.appspot.com/_ah/remote_api --filename=CSV_files/table_name.csv")
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다