I am trying to load a local csv file to my staging area in Snowflake, and am using:
PUT file:'//Users/mark 1/Downloads/pp-complete.csv' #~ auto_compress=true;
But I keep getting the error:
SQL compilation error: parse error line 1 at position 9 near '39'.
syntax error line 1 at position 74 unexpected '
As far as I can tell, there's nothing 'wrong' with the SCV file. It opens fine in SublimeEdit and Excel, and I can't see anything 'funny' in there to account for this.
Am stuck now.
Thanks,
Mark
PUT file://C:\\Users\\mark 1\\Downloads\\pp-complete.csv #~ auto_compress=true;
Above command worked, added snip for your reference. Instead of single quotes use double slash to escape your path. So change your put command as like below and try.
Could you try this?
PUT 'file:///Users/mark 1/Downloads/pp-complete.csv' #~ auto_compress=true;
I think you don't need single quotes, and an extra slash:
PUT 'file:///Users/mark 1/Downloads/pp-complete.csv' #~ auto_compress=true;
Refer to the examples here
EDIT: I realize you probably do need the quotes because of the space in your file name. but I think the issue is the missing slash
Related
I'm trying to import a database form mysql to weka, but the problem is that even after the database is loaded and displayed, when I click ok so I can start working whit the database, the message "unknown data type: INT" appears. I've tried modifying the DatabaseUtil.props file but nothing seems to work, so I really preacite if someone could tell me how to solve this issue once for all.
Thanks
You can either remove the comment from the int datatype lines in the prop file, or take the mysql prop file included, add:
INT=5
Since 5 is the identifier for int types, then rename the mysql props file to DatabaseUtil.props
Put just, without semicolons or others characters
INT=5
I am trying to import a flat file to a table in SSIS but its throwing an error because theres a "SUB" character on the last line. How can i get around this or remove it? Please see the screen shot below to see what i see in notepad++. When i remove it it works fine.
Any ideas?
Thanks in advance,
Craig
You just need to add a conditional split on your data flow and route your unusable rows out of your destination.
Reference-- (MSDN) http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=en-US&k=k(sql12.dts.designer.conditionalsplittrans.f1)&rd=true
I want to open a csv file (saved from openoffice calc) in weka.
I keep getting an error: "wrong number of values. 140 read, 139 expected on line 3."
The csv was already fixed with quotes around the labels. And I count 140 values on the first lines.
What is wrong here?
Link to the file.
Turns out there was an value somewhere for beyond sight in the excel file I was exporting.
I noticed it because all the rows ended with a comma instead of nothing.
Carefully selected only the right reach, copied in a document and works.
Hope this helps somebody else as well.
I had the same error.!!!! I found the solution.
Just remove all the double-quote, single-quote from the .csv, .xls file.
i,e for eg. under the Name column if the value is "john" it throws an error. Make it to john by removing the quotes.
To remove all the quotes, go to the excel file FInd and replace box.
Find what - "
Replace with - (empty space)
I also went through the same problem when I was using Weka and importing a csv file.
The problem is with the wrong formatting of the file
In my file there was a word in one of the columns GOV'T what I just did was removed the "'" and wrote a whole word GOVERNMENT and it worked.
Hope this helps !!
I had the same error. Problem was a sigle quote character in a string value. Solution for me was to eclose the whole string value in double quotes.
So I have to convert
this: ...,Uncharted 3: Drake's Deception,...
to this: ...,"Uncharted 3: Drake's Deception",...
using weka v. 3.8.0
This is because of addition of extra column. So to get rid of that error, select whole of that column and delete that column.
That should work fine. :)
I also encountered with that error. My csv file contains floating numbers. I have solved that problem by replacing "," with "." .
For me all of the above worked. I replaced " ' , with space.
I had the same error before. I changed my .xls files without any blank ranks. Sometimes the Weka loaded too many "," . But if I clear the blank ranks than the Weka could be work.
If you have copied data from another file using Conrol+A, Control+C and control+V, you copied extra columns. if you open csv file in Nodepad you will see comma in the end of each row. you got this error because of the comma in the end of each row.
To avoid this error, press Control and select columns one by one then Control+C now copy it to new File which you will use in weka.
or you can use another method to avoid comma in the end of each row.
I encountered the same problem.
Replacing/ erasing all " and ' with space worked for me!
I've been ramming my face against this sql error for about 45 minutes, and I have a feeling it's going to be something silly.
I'm trying to load a .txt file into my database, which is on a server elsewhere. I'm using putty on windows 7.
The sql call I am using is the following:
LOAD DATA LOCAL INFILE "C:/Users/Sam/Desktop/students_data.txt" INTO TABLE students;
The response I get is ERROR 2 (HYOOO): File 'C:/Users/Sam/Desktop/students_data.txt' not found (Errcode:2)
If anyone could shed some light on this that'd be extravagant. I already tried switching the / to \ and using single quotes, etc., but nothing seems to work. The file path is copied by shift+clicking the actual file and pasting it.
I have found a solution. First delete the word LOCAL from the sql statement. Second - place your file into MySQL DATA folder usually - bin/mysql/msql5.5.8/data/and your DB with which you are working. It worked for me. You might want to check your MAX_FILE upload number in php.ini file if file is large.
Removing the word LOCAL seemed to work for me; try it out!
Try to type path as C:\\mydir\\myfile.csv i.e. use \\ instead of \
I had this problem too, then I read this:
The file name must be given as a literal string. On Windows, specify
backslashes in path names as forward slashes or doubled backslashes
(from http://dev.mysql.com/doc/refman/5.1/en/load-data.html)
I did use the LOCAL keyword, but escaped the file path like this: str_replace('\\','/',$file), then it worked like a charm!
Had this too and solved it by using cmd.exe and found that the filename was mistakenly in the form filename.txt.txt and fixed it.
just replace "\" by "/" as the path directory before the filename.txt in (""). it will be better if u just keep the file in mysql data folder and do the thing i mentioned above.it will definitely work.
Sorry my previous answer is wrong.
In my case, I connect to a proxy, not the real physical mysql instance, so of course it could not get my local file.
To solve this, figure out the true physical mysql instance IP, connect it directly. You need help from the DBA.
LOAD DATA LOCAL INFILE 'C:\\cygwin\\home\\jml58z\\e_npv\\Fn_awk2010.mysql' INTO TABLE mydata
with the double \ it worked
Im trying to import the database file of wikipedia (titles only, 163M) from http://dumps.wikimedia.org/enwiki/latest/ with phpMyAdmin (I have a wamp configuration). I already changed the values on php.ini and Im receiving this error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
ERROR: Unknown Punctuation String # 1511
Where could be the problem? Do I need to change the coalltion from UTF8 to something else?
Thank you!
#user593712:
Do I need to change the coalltion from UTF8
No, you need to ensure that the database you're importing to is UTF-8. See http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Character_set
The error message tells you that, there is an error around line number 1511. Could you please check the contents around that line. Sometimes, single quote "'" should be replaced by "\'" to import into the database.