4

I've discovered for myself and also read other post about an issue using csvt file to define the field types - String, Integer, Date, Real ect... The csvt file appears to work as described when importing a csv file as a vector layer but does not work when using a delimited text layer.

The problem I have is I need both the "Date" feature from the csvt and the "watch" feature that the delimited layer offers to automatically update the csv file data whenever it changes.

Does anyone know of a way to add this type of "watch" capability in a vector layer?

UPDATED: Let me ask the question another way. I'm hoping this is a novice question that has a simple answer. Is there a way to update a vector layer's attribute table without having to recreate the layer?

  • I thought Add delimited text layer usually would try to make best guess to find appropriate field type. But it can fail to recognize Date if there were anything other than date, like...... null. Could replacing such non-date cell by a dummy date (e.g. '2000-01-01') be an option? – Kazuhito Jun 13 '17 at 4:43
  • 1
    Kazuhito - Thank you for your suggestion. My csv file has 5 date columns. 2 have no NULL values and the other 3 do. The delimited layer does not recognize the date as a date (No matter how the date is formatted). It see it as Qstring/type Text for all columns with or without null values. The vector layer see all 5 columns Qdate/type Date. BTW: Using Qgis ver 2.18.9 – Phil_in_Tx Jun 13 '17 at 14:22
  • You are right, sorry. I reproduced this issue in QGIS 2.14.15 and 2.18.9 on Windows10. Not sure what is happening. – Kazuhito Jun 13 '17 at 15:56
  • Kazuhito, thanks for verifying. I've update the question above. Maybe there is another way to think about this. – Phil_in_Tx Jun 13 '17 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.