I wanted to learn the conditional split in SSIS. Therefore, I took the first 100 IDs from a column and wanted to split them into two groups:
Small_ids: all IDs < 50
Big_ids: all IDSs >= 50
However, I am getting this error message when I want to connect to the output source:
Does anybody know how to fix this issue?
Thank you!
I would only have 1 test:
ID < 50
the rest would be default output which you can rename to BIG.
You really haven't given enough information to solve your real problem though.
Is the source configured with a SQL statement? The error is an error where no metadata is present.
Also, please try not to use pictures and when you do you should take the pertinent information out of the image and put in text. You will open up your answer pool to a greater audience as there are a few that can't see image links from work computer.
Related
I have a user who wants to show quality spec descriptions where the >= shows as an underlined > instead of having the = sign to the right. In SQL server, I cannot find a way to do this and I don't think there is an ASCII code for this. I know this is an obscure one but I thought I would ask the question.
Thanks,
Maria
Here is more information and an image of what is being asked for.
I wrote a SQL stored procedure that is executed by an SSRS report. The grid that is returned from this proc contains a formatted criteria column. The users want to see Less Than Or Equal To as a left carrot underlined. All in one space and not like this <=. In Excel and Word you can do this because you can just use < and then underline it. But in SQL, I can't do this. I cannot add the underline in SSRS because the column is a big long text string and it's variable. I've convinced the users to forget this. I told them that some things they have done in Word and Excel can't be done on this type of automated report. Short of using the ascii character of < and the ascii character for _ and then making sure they are on top of each other by preventing a space seems way too complicated when they can just get used to seeing <= or >= . Let me know if you agree and thanks for the input.
Thanks for the reply to my post.
I wrote a query using the query tool in pgadmin 4. Now I want to download the results as a csv. I´ve got two problems with that.
The 'Download as CSV'-button does not work sometimes. Especially when the result contains 1000+ rows.
When I finally have a csv and I want to open it, this message is all I see:
"'ascii' codec can't encode character u'\xbb' in position 26: ordinal not in range(128)"
Since I´m fairly new to all of this, could someone enlighten me to what is wrong?
On your questions:
The broken CSV download was a known bug that was fixed in pgAdmin v1.5 (Bug summary at the login-required https://redmine.postgresql.org/issues/2253; the gist is that there were multiple issues with exporting JSON data and Unicode). If you're not on that version, try updating and see whether you continue to have the issue.
You didn't specify where you're seeing that message regarding encoding, but the character referenced in the error is a "Right-Pointing Double Angle Quotation Mark" (») (http://www.codetable.net/hex/bb).
I'm trying to format a data file so that my other program will properly handle it. I am trying to handle the following data and I am getting a very weird error that I can't seem to put my finger on.
https://snap.stanford.edu/data/wiki-RfA.html
I am trying to format the data as [SRC TGT VOT], so I'd like the first two lines of my output file to be
1 2 1
3 2 1
because user 1 (stored in dictionary of users first) votes for user 2 with VOT 1 and then user 3 votes for user 2 with VOT 1. My problem is that when I try to run my code below, I always end up getting a very strange "invalid ascii sequence" error- can anyone help me identify the issue or perhaps find a way around this? It'd obviously be best if I could learn what I am doing wrong. Thank you!
Note, I understand that this is a bit specific of a question and I appreciate any help- I'm sort of baffled by this error and don't know how to resolve it at the moment.
f=open("original_vote_data.txt") #this is the file linked above
arr=readlines(f)
i=edge_count=src=tgt=vot=1
dict=Dict{ASCIIString, Int64}()
edges=["" for k=1:198275]
while i<1586200
src_temp=(arr[i])[5:end-2]
if (haskey(dict, src_temp))
new_src= dict[src_temp]
else
dict[src_temp]=src
new_src=src
src=src+1
end
tgt_temp=(arr[i+1])[5:end-2]
if (haskey(dict, tgt_temp))
new_tgt= dict[tgt_temp]
else
dict[tgt_temp]=tgt
new_tgt=tgt
tgt=tgt+1
end
vot_temp=(arr[i+2])[5]
edges[edge_count]=string(new_src)* " " * string(new_tgt)* " " *string(vot_temp)
edge_count=edge_count+1
i=i+8
end
Here we go - I'll write up my comment as an answer since it seems to have solved the question.
My hunch that the error stemmed from the fourth line (dict=Dict{ASCIIString, Int64}) was based on the fact that ASCIIStrings will error if you try to store non-ASCII characters in them. Since this file is coming from an international site, it's not unlikely that there are users with unicode characters in their names (or elsewhere in the data). So the simple fix is to change all instances of ASCIIString to UTF8String.
Just to make this answer a bit more complete, I downloaded the file and tried running the program. The simplest way to debug this is to run the script at top-level in the REPL and then inspect the program state after the error. After the error is thrown, i==3017. Now just try running each line of the while loop incrementally. You'll quickly see that line 3017 contains "SRC:Guðsþegn\n" — unicode, as I suspected. When you try to create a new entry in dict with that as the key, the error should have a backtrace to setindex! in dict.jl, where you'll see that it's trying to convert the key (a UTF8String) to an ASCIIString. So changing the dictionary type to have UTF8String keys solves the problem.
As it turns out, the edges array only contains strings of three integers (or sometimes a hyphen), so the ASCIIString there is ok, but still a little dangerous. I'd probably store that information in a more dedicated array of ints instead of converting it to a space-separated string: you know the first two elements in the string are ints, but the last element is unvalidated text from the file itself… which may be unicode or a space itself (which could mess up processing down the line).
I'm trying to import .csv files into a SQL Server database in a web server. I have about 30000 rows in the table. The delimiter is ; in the csv file. It inserted 11202 rows but after that it is not inserting and saying;
Incorrect syntax near 'Farms'. Incorrect syntax near 'Dale'. Incorrect
syntax near 'City'. Incorrect syntax near 'Center'. Incorrect syntax
near 'Depot'.
These rows are;
111203;Greens Farms;12;446;nocity.jpg;NULL
111205;Grosvenor Dale;12;446;nocity.jpg;NULL
111219;Jewett City;12;446;nocity.jpg;NULL
111230;Mansfield Center;12;446;nocity.jpg;NULL
111231;Mansfield Depot;12;446;nocity.jpg;NULL
I thought it is about the space (' ') between the city names like Green Farms but there are so many cities which have blanks and they were inserted successfully in previous rows. I doesn't make any sense.
Do you have any idea about this situation ?
I'd recommend dividing your csv into two files. Of course, the first file will contain the 11202 rows that were successfully imported, and the second would include the remaining ~18798.
One would expect that the first file would be imported with no errors.
Then when you import the second file, you might find that you are dealing with a boundary restriction of some sort, if that file also starts bombing after 10 or 11K imports.
Or, you may more quickly be able to spot the problem importing the smaller second file.
If you are still getting exactly the same errors, but only a limited number, then I'd recommend removing the error rows completely and putting them in yet another file.
In this manner, you'll eventually have imported nearly all your data and you'll be left with a manageable subset where again you may be able to more easily spot the problem.
If, after all that, you've got 10 rows that give errors and you can't see any reason why, just use SQL insert statements to put them in your db.
Hopefully this isn't part of some goal to automate a regularly scheduled process!!
I'd be interested to see how this goes for you. Thanks.
I'm trying to create a new column based on my main project's Date column that pulls timeline events from another Google Refine project:
cell.cross("Clean5 Timeline", "TimelineDate").cells["TimelineEvent"].value[0]
The dates are in the same format in both Google Refine projects. But it fills no cells, and I get this error:
Error: Cannot retrieve field from null
This —
cell.cross("Clean5 Timeline", "TimelineDate")
— returns [ ] for rows where there should be a match.
And this —
cell.cross("Clean5 Timeline", "TimelineDate").cells["TimelineEvent"]
— returns null for those rows.
I copied the syntax directly from the GREL help files: http://code.google.com/p/google-refine/wiki/GRELOtherFunctions. Can anyone suggest what I may be overlooking?
Thanks.
Without access to your projects it's going to be difficult to answer this, but the first thing I'd suggest is that you trim back your expression to find out exactly where the null is coming from.
Since
cell.cross("Clean5 Timeline", "TimelineDate")
is returning an empty array ([]), nothing based on that result is going to work.
There are three possible problems that I can think of: 1) the project name is wrong, 2) the column name is wrong, 3) the data values don't match (or Refine doesn't think they do), or 4) you are running into a caching bug with cross() that exists in Refine 2.5.
Restarting the Refine server should clear the cache if you're running into the bug and it's also fixed in the current source repository. The fix will be included in OpenRefine 2.6.