GetDKAN / dkan2

Deprecated: please use the 2.x branch of the dkan repo
https://github.com/GetDKAN/dkan
GNU General Public License v2.0
18 stars 16 forks source link

Dataset throws 'Could not instantiate the table due to a lack of schema.' on csv upload #411

Open Deepak-ix opened 3 years ago

Deepak-ix commented 3 years ago

I am facing issue on preview of uploaded csv file.

In the decoupled frontend, I am getting ‘Could not instantiate the table due to a lack of schema.’.

Steps to reproduce: • I have added the csv in the media -> Document -> And uploaded my csv file and copy link address. • While adding new project distribution, in the download url I have saved the csv file path.(If I hit the url directly file is downloading correctly). • Once dataset added, I have rebuild tracking information on search API and re-index the dataset • Removed my cache folder using command ’ rm -rf public/ .cache/’ and run ‘npm run build’.

In the decoupled frontend, added dataset are loading with project distribution but for some dataset it throws the above message.

Request url: http://www.mysiteurl.com/api/1/datastore/sql/?query=[SELECT%20COUNT(*)%20FROM%20b10c41ac-aa45-566e-95e7-7942d9332499]&show-db-columns Response : {"message":"Could not instantiate the table due to a lack of schema."}