Put all the files together into a zip and upload here so we can check.
what should it be? im doing it as i see on step one. them meta is empty because i have no idea how to refer to a table from here.
locationn,25.8889775,45.3576753,“stores”,“”
The first line of GeoPoint.csv
must have the following:
"id(STRING_ID)","latitude(DOUBLE)","longitude(DOUBLE)","category(STRING(null))","metadata(STRING(null))"
Here’s a working zip. The data is imported properly, however, the metadata for the geopoint doesn’t show up unless you add another metadata property. This is a display issue, we will fix that one. However, from the API perspective, it works just fine for the data retrieval.
Archive.zip (1.3 KB)
haha
so there is no issue from the beginning the data was imported but it was just a display issue in the meta that got me confused.
if its working fine in the API then that’s whats count.
Hey @mark-piller
this is what i get when i search for geopoints in radius with metadata included
[
{
"___jsonclass": "GeoPoint",
"metadata": {},
"distance": 0,
"latitude": 25.8889775,
"___class": "GeoPoint",
"categories": [
"stores"
],
"objectId": "locationn",
"longitude": 45.3576753
}
]
there is no meatdata. i used the file you included
Hello @mohammad_altoiher,
I’ve imported the archive provided by Mark and made the GET request using curl:
curl -X GET -v "http://api.backendless.com/APP_ID/API_KEY/geo/points?categories=stores&includemetadata=true"
and I’ve got this result:
[
{
"objectId":"locationn",
"categories":["stores"],
"metadata": {
"location":[{"created":1571078500000,"rating":"4.5","updated":null,"objectId":"storee","ownerId":null,"___class":"store1"}]
},
"latitude":25.8889775,
"longitude":45.3576753,
"___class":"GeoPoint"}]
If this request doesn’t work for you please provide your APP ID.
Regards,
Olha
In your app I can see only one GEO Point in the “stores” category and there is no metadata,
so, your result is expected, isn’t it?
Regards, Vlad
thats from the imported data that mark provided and i said there is no metadata
he said that its a display bug on the console
It seems to be not a display issue but import issue. The internal ticket BKNDLSS-20002 is created.
We’ll inform here as soon as it will be fixed.
Regards,
Olha
I investigated your issue. It is caused by restriction of geo-point relations. You can’t have several tables with geo-point relation that have same name.
In your database you have two tables (store
and store1
) with column location
.
You should change column name in one of the tables and reimport data for changed table. After this actions you will be able to retrieve metadata with geo-points.
Hey @Andriy_Konoz
i have changed the column name for one of the tables (store1
) and reimported the data that didn’t fix the issue
there is still no metadata for the geo-point in the console or with the API using codeless
Do you also changed file header? Please, drop also existing store1
table before import and clear previously imported geo data that is related to store1
.
i have deleted the table and created a new one
still the same
i see the reference in the data table but not the geo-point metadata
Please send in zip archive data that you try to import.
You have several mistakes in your files:
- In
GeoPoint.csv
header is missing. Each file is requires header in which column names and other metadata is specified. new_store.csv
for relation must useone-to-many
.
In attachment I placed archive in which I fixed described problems. Pay attention to the files headers.
data.zip (556 Bytes)
but how can you import geo point with header? thought we must not include it
i get this error on import of the geo point
18:19:35 IMPORT_GEO Importing Started.
18:19:35 IMPORT_GEO Importing failed. Exception:java.lang.NumberFormatException: For input string: “latitude(DOUBLE)”sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) java.lang.Double.parseDouble(Double.java:538) com.backendless.management.impex.csv.geo.GeoPointDTOParser.parseEntry(GeoPointDTOParser.java:36) com.backendless.management.impex.csv.geo.GeoPointDTOParser.parseEntry(GeoPointDTOParser.java:16) com.googlecode.jcsv.reader.internal.CSVReaderImpl.readNext(CSVReaderImpl.java:68) com.backendless.tasks.impex.ImportGeoPointsTask.importPoints(ImportGeoPointsTask.java:77) com.backendless.tasks.impex.ImportGeoPointsTask.executeImpl(ImportGeoPointsTask.java:55) com.backendless.tasks.impex.AbstractImportTask.execute(AbstractImportTask.java:83) com.backendless.taskman.Task.run(Task.java:131) java.lang.Thread.run(Thread.java:745)
18:19:35 IMPORT_GEO Importing Finished.