8 Replies Latest reply on Jan 25, 2013 5:22 AM by Anuj Khandelwal

    Custom Import Geocoding is not working

    Anuj Khandelwal

      Hi All,

       

      I was trying create a csv to upload as for the Custom GEocoding.

       

      I have used Latitude and Longitude Columns in the CSV file, still each time when I am trying to import that file getting an error as in the attachment.

       

      Could you please tell me how to resolve it.

       

      Regards,

      Anuj

        • 1. Re: Custom Import Geocoding is not working
          Tracy Rodgers

          Hi Anuj,

           

          Are you able to post the CSV file so that we can take a closer look and get you up and running?

           

          -Tracy

          • 2. Re: Custom Import Geocoding is not working
            Anuj Khandelwal

            Hi Tracy,

             

            Here attached are the CSV files that I am using.

             

            Thanks,

            Anuj

            • 3. Re: Custom Import Geocoding is not working
              Vladislav Grigorov

              Hello Anuj,

               

              At first look, I discovered that your files are actually "tab"-delimited, instead of "comma"-delimited. Beware that the column separator for custom geocoding files must be comma - I also had hard times with that in the past.

              Then I used Notepad++ to easily find-replace-all tabs with commas, and ran a test import. Hard luck again! I opened the files in Excel to have a look at the data. In the country file you have duplicate rows for the same country, which is not allowed again in custom geocoding - i.e. each geographic point must be unique.

               

              So I leave this over to you buddy, hope this gives you some guidance!

               

              Vlad

              • 4. Re: Custom Import Geocoding is not working
                Anuj Khandelwal

                Hi Vlad,

                 

                I have attached one more file - State.csv. This have separate rows for cities.

                 

                This is also creating problem, even after I have made the file comma delimited.

                 

                Please suggest, i am not able to get, why this is showing error.

                 

                Thanks,

                Anuj

                • 5. Re: Custom Import Geocoding is not working
                  Vladislav Grigorov

                  Hi,

                   

                  I checked that file also, andagain you have duplicate records for one geographic location. This basically happens at the City level, which I am not certain if must be pesent at all in the file, as it is a lower granularity level. Anyway, I could spot 2 Luanda's, 2 Buenos Aires, and so on. Remove the duplicates (and possibly the City from that list), and then I believe it should work for you!

                   

                  Vlad

                  • 6. Re: Custom Import Geocoding is not working
                    Anuj Khandelwal

                    Hi Vlad,

                     

                    I have just kept a single record after the Title row.

                     

                    Still it is showing error in uploading.

                     

                    Anuj

                    • 7. Re: Custom Import Geocoding is not working
                      Vladislav Grigorov

                      Hi Anuj,

                       

                      Sorry man, I've been experimenting with Custom Geocoding quite some time ago, and it appears my guidance was far from sufficient. So today I took your original files, and did some cleansing needed to import them as Custom Geocoding. Attached is an archive with the files I imported, but please note, that I removed lines (records) arbitrary, so these may not do the job for you. Anyway, here are the steps that I went through, so that Tableau stopped complaining:

                      1) Have the proper column delimeter - this is cucial, as well as the type of the file must be CSV. Actually you can place a small schema.ini file within the folder that containf your files for import, so that you "override" the default regional settings for your computer, and also instruct Tableau what specific delimeters, and field names you have in the CSV files. I did not do that in your case, but this provides additional flexibility. I could send you a sample file if you need, but if you google about such a file, you will understand how to make it from scratch.
                      2) You must remove all duplicate rows. What I mean is: for every custom geocoding role (type of field - e.g. country, state, city) you MUST have a unique name, which is used as a key.
                      3) You need to trim all spaces in Latitude/Longitude - you had some places with missing lat/long, as well as some lat/longs with spaces in them. These you have to cleanse also - I used the "TRIM()" function in Excel to do the job.
                      4) Removed all quotation marks wrapping all your data. These are basically not needed, although I am not certain if Tableau would complain about them. I thing for the lat/long for sure it should complain, as these have to be measures.
                      5) You had some records with missing place names - just blanks for Country/State/City. I removed them also.
                      6) If you are using the standard built in field names that Tableau uses (e.g. Country), then you are not able to overwrite values that exist in Tableau's internal geocoding database. I.e. if you try to import a place that exists as a record for the geographic role, Tableau will issue an error. So I decided to change the name of the roles and added "Test_" in front of the column names. Thus these are imported separately from Tableau's internal geocoding DB.
                      7) Not 100% certain about that, but the import should follow the logical hierarchy structure that you have - i.e. from country to state to city. Hence your files should be named in a way, so that Tableau sorts them properly - theerefore I added the numbers in front.
                      8) I separated every geographic role in a separate file. Otherwise Tableau was complaining that it was not finding some places in the State role.
                      9) Excel does not recognize all duplicates properly - neither capital letters/ small ones, nor special preceding or triling symbols. As Tableau continued to complain, I opened the City file in Tableau itself, and it turned out that indeed there was a city in Japan named "Hino " that was actually appearing on 2 rows, so I deleted one of the occurences.

                      Finally when Tableau successfully imported everything, it did not issue any message, and I was able to see the three new geographic roles available.Attached is screenshot of the final outcome, as well as the files I actually imported.

                       

                      Hope this helps and best regards!

                       

                      Vlad

                      1 of 1 people found this helpful
                      • 8. Re: Custom Import Geocoding is not working
                        Anuj Khandelwal

                        Hi Vlad,

                         

                        It was helpful, I have used your files to import the GEOCODING, it was getting loaded fine.

                         

                        However when I applied the Geographic role for my data fields in the report, i can see Symbol Maps only, however I wanted to use the Filled Map view, which I was not able to select.

                         

                        The other thing is, if I am making any modifications in your file (Just Changed the Title of columns, eg Test_Country_1 etc), it is again giving me errors.

                         

                        I will try to follow, all your mentioned steps, hope that will work for me.

                         

                        But still confused, are the titles making the issues or the data.

                         

                        Thanks & Regards,

                        Anuj