Unable to export the Commcare data into sql db by using the Advanced API's tool

Hi,

I am trying to give a setup as per the below URL link for the Commcare data
export into the sql format in a Windows 8.1 machine:

https://help.commcarehq.org/display/commcarepublic/CommCare+Data+Export+Tool#CommCareDataExportTool-4.SavetheoutputofanexamplequerytoaSQLdatabase

But while running the below command line syntax :

C:>python34\scripts\commcare-export --output-format sql --output
sqlite:///registrations.db --project crs --query demo_registrations.xlsx

Its flashing the errors (attaching the errors report) and not able to move
forward.

There are few trouble shootings also have been done to trace out the exact
issues as follows :

  1. sqllite3 : I have tested the application by creating a test database as
    follows :

C:\sqlite>sqlite3.exe test.db
SQLite version 3.8.7.1 2014-10-29 13:59:56
Enter “.help” for usage hints.
sqlite> create table first (a int, b string);

sqlite> .schema
CREATE TABLE first (a int, b string);

  1. The above SQL command has been tested by exporting the data into the
    xls format :

C:\python27\scripts\commcare-export --output-format xlsx --output
registrations-result.xlsx --project crs --query demo_registrations.xlsx

I am not able to trace out the issue details, so kindly suggest me for the
next troubleshooting steps.

With regards,
Gurudayal Sahu

Error_DatExport_SQL.txt (3.1 KB)

Hi,

This issue has been resolved by changing the path of the db from from C:\
drive to its subfolder.

Thanks & regards,
Guurudayal Sahu

··· On Saturday, 1 November 2014 01:20:25 UTC+5:30, Gurudayal Sahu wrote: > > Hi, > > I am trying to give a setup as per the below URL link for the Commcare > data export into the sql format in a Windows 8.1 machine: > > > https://help.commcarehq.org/display/commcarepublic/CommCare+Data+Export+Tool#CommCareDataExportTool-4.SavetheoutputofanexamplequerytoaSQLdatabase > > > But while running the below command line syntax : > > C:\>python34\scripts\commcare-export --output-format sql --output > sqlite:///registrations.db --project crs --query demo_registrations.xlsx > > Its flashing the errors (attaching the errors report) and not able to move > forward. > > There are few trouble shootings also have been done to trace out the exact > issues as follows : > > 1. sqllite3 : I have tested the application by creating a test database as > follows : > > C:\sqlite>sqlite3.exe test.db > SQLite version 3.8.7.1 2014-10-29 13:59:56 > Enter ".help" for usage hints. > sqlite> create table first (a int, b string); > > sqlite> .schema > CREATE TABLE first (a int, b string); > > > 2. The above SQL command has been tested by exporting the data into the > xls format : > > C:\python27\scripts\commcare-export --output-format xlsx --output > registrations-result.xlsx --project crs --query demo_registrations.xlsx > > > I am not able to trace out the issue details, so kindly suggest me for the > next troubleshooting steps. > > With regards, > Gurudayal Sahu > > > >

Hi Guurudaya

I’m glad you got it working. Sorry you didn’t get a response earlier.

Best regards
Simon

··· On 2 November 2014 18:07, Gurudayal Sahu wrote:

Hi,

This issue has been resolved by changing the path of the db from from C:
drive to its subfolder.

Thanks & regards,
Guurudayal Sahu

On Saturday, 1 November 2014 01:20:25 UTC+5:30, Gurudayal Sahu wrote:

Hi,

I am trying to give a setup as per the below URL link for the Commcare
data export into the sql format in a Windows 8.1 machine:

https://help.commcarehq.org/display/commcarepublic/
CommCare+Data+Export+Tool#CommCareDataExportTool-4.
SavetheoutputofanexamplequerytoaSQLdatabase

But while running the below command line syntax :

C:>python34\scripts\commcare-export --output-format sql --output
sqlite:///registrations.db --project crs --query demo_registrations.xlsx

Its flashing the errors (attaching the errors report) and not able to
move forward.

There are few trouble shootings also have been done to trace out the
exact issues as follows :

  1. sqllite3 : I have tested the application by creating a test database
    as follows :

C:\sqlite>sqlite3.exe test.db
SQLite version 3.8.7.1 2014-10-29 13:59:56
Enter “.help” for usage hints.
sqlite> create table first (a int, b string);

sqlite> .schema
CREATE TABLE first (a int, b string);

  1. The above SQL command has been tested by exporting the data into the
    xls format :

C:\python27\scripts\commcare-export --output-format xlsx --output
registrations-result.xlsx --project crs --query demo_registrations.xlsx

I am not able to trace out the issue details, so kindly suggest me for
the next troubleshooting steps.

With regards,
Gurudayal Sahu


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa