datacommonsorg / mixer

Mixer provides the translator engine and API interface to access Data Commons graph
https://datacommons.org
Apache License 2.0
13 stars 36 forks source link

[BUG] Recon API: Table not found error while resolving geoIds from latitude/longitude #790

Open sharadshriram opened 2 years ago

sharadshriram commented 2 years ago

Describe the bug While using the Recon API to resolve geoIds from latitude/longitude of superfund sites, we get a response which says Table not found (seen from autopush).

This issue is while investigating the https://github.com/datacommonsorg/data/issues/650

To Reproduce

  1. Run the command:
    curl -X POST https://autopush.recon.datacommons.org/coordinate/resolve -d '{"coordinates": [{"latitude":"39.163611","longitude":"-76.698331"}]}'

Expected behavior To get a list of resolved geoIds from the latitude and longitude -- ["zip/21077, geoId/2402, geoId/2400390008, geoId/24003751200, geoId/24003, geoId/24"] -- as part of the JSON response under the placeCoordinates key.

Screenshots image

cc: @shifucun , @Spaceenter

sharadshriram commented 2 years ago

Update: The autopush url is now working and we get the expected outputs:

input command:

curl -X POST https://autopush.recon.datacommons.org/coordinate/resolve -d '{"coordinates": [{"latitude":"39.163611","longitude":"-76.698331"}]}'

obtained output is the same as expected output,

{"placeCoordinates":[{"latitude":39.163611,"longitude":-76.698331,"placeDcids":["zip/21077","ipcc_50/39.25_-76.75_USA","geoId/sch2400060","geoId/2402","geoId/2400390008","geoId/24003751200","geoId/24003","geoId/24","country/USA"]}]}

However, running the recon API with PROD url,

curl -X POST https://recon.datacommons.org/coordinate/resolve -d '{"coordinates": [{"latitude":"39.163611","longitude":"-76.698331"}]}'

Gives the following response:

curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to recon.datacommons.org:443 
shifucun commented 2 years ago

Oh, right, the prod instance does not work yet. Please use autopush for now.

sharadshriram commented 2 years ago

Update: In an offline discussion, @pradh suggested to use staging.recon.datacommons.org as the base url for the recon API in the scripts, instead of autopush.recon.datacommons.org.

This change will make the scripts access the recon API when run with non-corp accounts.

pradh commented 2 years ago

I suggested staging. That's what the import-tool uses too.

At some point we should migrate to prod mixer?

shifucun commented 2 years ago

Oh, do you mean the prod mixer or prod recon server. I feel we prob want to merge the two into one server..

pradh commented 2 years ago

I mean prod mixer. I thought we've already merged the code.