POST
|
SUCCESS! I used the schema.ini example you just posted changing ONLY TabDelimited to CSVDelimited. Thank you!
... View more
02-04-2016
03:28 PM
|
0
|
1
|
689
|
POST
|
Well, my actual csv file is comma delimited. The sample I posted here I opened in excel and copied and pasted a table-like structure. Should it read Format=CommaDelimited?
... View more
02-04-2016
03:23 PM
|
0
|
1
|
689
|
POST
|
Did you run it with column names like: Col1=A Long or Col1=X Double ? Wondering what you may have done differently.
... View more
02-04-2016
03:21 PM
|
0
|
3
|
689
|
POST
|
Changed to: [test.csv] ColNameHeader=True DateTimeFormat=dd-MMM-yyyy Format=CSVDelimited Col1=X Long Col2=Y Long Col3=START_DTTM DateTime Col4=END_DTTM DateTime Col5=Value Double Still failed...
... View more
02-04-2016
02:56 PM
|
0
|
0
|
671
|
POST
|
Here is a sample of my data: X Y START_DTTM END_DTTM Value 1468050 750150 1/7/2016 1/31/2016 0.13237318 1468100 750150 1/7/2016 1/31/2016 -0.60834539 1468150 750150 1/7/2016 1/31/2016 -0.17450202 1468200 750150 1/7/2016 1/31/2016 -0.34773338 1467700 750100 1/7/2016 1/31/2016 -0.19723971 1467750 750100 1/7/2016 1/31/2016 0.16580771
... View more
02-04-2016
02:55 PM
|
0
|
10
|
689
|
POST
|
Well no, that's something else I grabbed from the example. It said you should copy that as is.... ay ay ay. Ok, so A, B, C etc, represents the actual column names... ? I'll try that and report back.
... View more
02-04-2016
02:51 PM
|
0
|
1
|
671
|
POST
|
I just grabbed that directly from the example. I thought about just removing it altogether and let it carry over the date as is, but figured I'd leave it in just in case.
... View more
02-04-2016
02:48 PM
|
0
|
1
|
671
|
POST
|
Something isn't working... So, after having created the Schema.ini file containing this info: [test.csv] ColNameHeader=True DateTimeFormat=dd-MMM-yyyy Format=CSVDelimited Col1=A Long Col2=B Long Col3=C DateTime Col4=D DateTime Col5=E Double My conversion script is suddenly failing. As soon as I remove this Schema.ini file, it runs fine. Guessing there is something wrong with my Schema.ini file. Is it clear where I went wrong? It's in the same directory as the csv.
... View more
02-04-2016
02:40 PM
|
0
|
7
|
1659
|
POST
|
Ok, I found this example here: Does this method apply in my situation? http://stackoverflow.com/questions/12259562/how-can-i-create-schema-ini-file-i-need-to-export-my-csv-file-to-datagridvie…
... View more
02-04-2016
01:58 PM
|
0
|
10
|
1659
|
POST
|
Ok. My schema.ini file was created when I made a connection to my .csv file in Toad. After looking at this file, I'm thinking it's not what I'm after. Can you explain how you created your schema.ini file to suit your needs?
... View more
02-04-2016
01:54 PM
|
0
|
11
|
1659
|
POST
|
Ok. I have a schema.ini file. Do I need to point the script to that file in some way or does it simply need to be present in the same directory as the script or output?
... View more
02-04-2016
01:40 PM
|
0
|
14
|
1659
|
POST
|
So, I successfully converted my .csv to a .dbf with this script: env.workspace = r"c:\Output" inTable = r"c:\Output\test.csv" outLocation = r"c:\Output" outTable = "test.dbf" arcpy.TableToTable_conversion(inTable, outLocation, outTable) The problem is, in the resulting .dbf file, its adding a decimal with trailing zeroes to the value: 750050 becomes 750050.00000000000 How can I avoid this?
... View more
02-04-2016
01:19 PM
|
1
|
30
|
6560
|
POST
|
This is related to the same effort, but specifically to the output... If need to start a new post, let me know... In the resulting .dbf file, its creating a decimal with trailing zeroes: 750050 becomes 750050.00000000000 How can I avoid this?
... View more
02-04-2016
10:23 AM
|
0
|
0
|
336
|
POST
|
Thank you. I got it working. I had a few things wrong. Here is my new WORKING code: import arcpy from arcpy import env env.workspace = r"C:\test" inTable = r"C:\test\test.csv" outLocation = r"C:\test\output" outTable = "test.dbf" arcpy.TableToTable_conversion(inTable, outLocation, outTable)
... View more
02-03-2016
01:37 PM
|
0
|
0
|
1398
|
Title | Kudos | Posted |
---|---|---|
1 | 02-04-2016 01:19 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|