1. What is the problem? Be very detailed.
We created an ODKAggregate and it is connected to our postgreSQL server. I am trying to use pull data to extract a longitude and a lattitude from a .csv file into my form. This works, but when i am looking at the result in the PostgreSQL database, the value is written there as a string (varchar in PostgreSQL). How can i use pull data and define the data type, so the result in my PostgreSQL database are saved as a 'float' value?
2. What app or server are you using and on what device and operating system? Include version numbers.
ODK Version 1.24, PostgreSQL and PGADMIN 4
3. What you have you tried to fix the problem?
I've taken several steps to fix the problem. First i tried to change my system seperator in the .csv file, but the pull data request results in an empty field in that case.
Next, i tried to manually set the data type of the longitude and latitude column to float (double precision) in PostgreSQL but this resulted in an error where new forms couldn't be uploaded anymore.
4. What steps can we take to reproduce the problem?
Create pull data command where you pull a decimal number from a csv, and see how this looks in PostgreSQL.
Thank you in Advance!
Good afternoon @coenecorys and welcome to the ODK community forum !
When you get a chance please take some time to Introduce yourself here! - #1211 by bcheye It helps to build the community
So you get a csv from Aggregate's database and then upload this csv file to your own PostgreSQL database ?
Could it by a matter of decimal value separator (./,) or quoted numeric strings "3.869542"...
What tool do you use to pull csv to your database.
Thank you for your answer!
I upload a new form to the Aggregate, with one media file. This media file is a .csv file, which my forms pulls data from (the x and y coordinate). These records are saved in the form and after finishing the form, it is uploaded to the PostgreSQL database. If i look into the data types of the PostgreSQL table, i see that both fields (one for longitude, and one for latitude) are saved as strings, and not as decimals.
It could be the matter of a value seperator. The seperator now is a dot(.). When I change the separator to a comma, the pulldata request does not work anymore.
Any idea what i should do?
EDIT: I resolved the issue by coming up with a work around, where I'm able to visualize the longitude and latitude in text form (using Power BI Visuals)