Import relations question

it does import even if the file not named GeoPoint.csv
however i did try after renaming and its the same.

Put all the files together into a zip and upload here so we can check.

Desktop.zip (400 Bytes)

Your GeoPoint.csv is invalid. See item #1 in there instructions here: Import relations question

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

im using codeless
app id 07D0CC0C-4A50-198B-FFFB-78866CCD9600

Hi @mohammad_altoiher

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

1 Like

Hi @mohammad_altoiher

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.

Archive.rar (252 Bytes)

You have several mistakes in your files:

  1. In GeoPoint.csv header is missing. Each file is requires header in which column names and other metadata is specified.
  2. new_store.csv for relation must use one-to-many.

In attachment I placed archive in which I fixed described problems. Pay attention to the files headers.
data.zip (556 Bytes)