Space came between digits in jQgrid when showing total number of records in the end - jqgrid

The jQgrid list shows a space between the first and second digit when the number of items are in to 4 digits. For example, when I was viewing, there were 3956 users and it was displaying on the right side bottom part of the table as ‘3 956’.

The space as the separator will be shown because of wrong value of thousandsSeparator value in grid.locale-en.js file. This is correct for Bulgarian (the developer of jqGrid come from Bulgarian), but looks strange for you.
Yo can modify the value thousandsSeparator from " " to "," in the grid.locale-en.js file file or make the following changes
$.jgrid.formatter.integer.thousandsSeparator=',';
$.jgrid.formatter.number.thousandsSeparator=',';
$.jgrid.formatter.currency.thousandsSeparator=',';
before the first call of jqGrid.
If you want you can use no separator ('') instead of the comma (',').

Related

data factory special character in column headers

I have a file I am reading into a blob via datafactory.
Its formatted in excel. Some of the column headers have special characters and spaces which isn't good if want to take it to csv or parquet and then SQL.
Is there a way to correct this in the pipeline?
Example
"Activations in last 15 seconds high+Low" "first entry speed (serial T/a)"
Thanks
Normally, Data Flow can handle this for you by adding a Select transformation with a Rule:
Uncheck "Auto mapping".
Click "+ Add mapping"
For the column name, enter "true()" to process all columns.
Enter an appropriate expression to rename the columns. This example uses regular expressions to remove any character that is not a letter.
SPECIAL CASE
There may be an issue with this is the column name contains forward slashes ("/"). I accidentally came across this in my testing:
Every one of the columns not mapped contains forward slashes. Unfortunately, I cannot explain why this would be the case as Data Flow is clearly aware of the column name. It can be addressed manually by adding a Fixed rule for EACH offending column, which is obviously less than ideal:
ANOTHER OPTION
The other thing you could try is to pre-process the text file with another Data Flow using a Source dataset that has no delimiters. This would give you the contents of each row as a single column. If you could get a handle on the just first row, you could remove the special characters.

Getting error in split function inside array formula when using it with column title(array literal)

I am using these functions in my google sheets. With an array literal, I am getting an error when there are comma-separated inputs which need to be split but its working fine when there is only value in the K column. It's working fine without column title. Can someone explain the error in the first code?
={"Don't Edit this Column TargetGroup ID";Arrayformula(IFERROR(SPLIT(MainSheet!K2:K,",",TRUE, True),""))}
and
=Arrayformula(IFERROR(SPLIT(MainSheet!K2:K,",",TRUE, True),""))
Try this one:
={
"Don't Edit this Column TargetGroup ID", Arrayformula(SPLIT(REPT(",", COLUMNS(SPLIT(MainSheet!K2:K,",")) - 2), ",", True, False));
Arrayformula(IFERROR(SPLIT(MainSheet!K2:K,","),""))
}
You had only one string value for the first raw in you array literal ({}), so it is only one column.
Presumably, SPLIT found at least one comma and gave you a minimum of two column range which cannot be attached to that first row of yours (the header string) from the bottom as they do not match column-wise.
This SPLIT(REPT(...), ...) gives a needed number of empty cells to append to the right of your header so the number of columns will match.
If that is not the case then please provide a error message or, even better, share a sample sheet where this issued is reproduced.

How can I extract a column's (called say "X") any cell value from a text file with multiple columns using Bash?

I have a huge file with 100 columns.
I am concerned with one column called 'Location'. I know for a fact that all rows of this column are same in value. I need to get that value through Bash.
Any thoughts on how to go about this?
If the column is always in the same location relative to other columns (say 10th) you could use
cut -d" " -f10
In this case you're assuming there's one whitespace between each column, you could change the delimiter to whatever separates between the columns.

Losing decimal places when exporting to csv

I am exporting data from oracle table into a csv file. I have a column of varchar2 datatype and it has values like 1.1 and 1.10. When I export these to a csv file the value 1.10 becomes 1.1 and thus creating duplicate records. Is there a way to get both the values 1.10, 1.1 into csv file without loosing the last zero in "1.10".
Thanks
When I export these to a csv file the value 1.10 becomes 1.1 and thus creating duplicate records.
This has nothing to do with Oracle. It is a display problem with the tool you are using. use proper formatting of cells to display up to required decimal places.
Also, 1.1 and 1.10 are same. Appending zeroes to the right after decimal makes no significant difference to the value.
Excel Text Formatting
Right click on the cell.
Select Format Cells.
In the first tab Number, select Text.
Click OK.
Text format cells are treated as text even when a number is in the cell.
The cell is displayed exactly as entered.

Split a Value in a Column with Right Function in SSIS

I need an urgent help from you guys, the thing i have a column which represent the full name of a user , now i want to split it into first and last name.
The format of the Full name is "World, hello", now the first name here is hello and last name is world.
I am using Derived Column(SSIS) and using Right Function for First Name and substring function for last name, but the result of these seems to be blank, this where even i am blank. :)
It's working for me. In general, you should provide more detail in your questions on places such as this to help others recreate and troubleshoot your issue. You did not specify whether we needed to address NULLs in this field nor do I know how you'd want to interpret it so there is room for improvement on this answer.
I started with a simple OLE DB Source and hard coded a query of "SELECT 'World, Hello' AS Name".
I created 2 Derived Column Tasks. The first one adds a column to Data Flow called FirstCommaPosition. The formula I used is FINDSTRING(Name,",", 1) If NAME is NULLable, then we will need to test for nullability prior to calling the FINDSTRING function. You'll then need to determine how you will want to store the split data in the case of NULLs. I would assume both first and last are should be NULLed but I don't know that.
There are two reasons for doing this in separate steps. The first is performance. As counter-intuitive as it sounds, doing less in a derived column results in better performance because the SSIS engine can better parallelize the operations. The other is more simple - I will need to use this value to make the first and last name split so it will be easier and less maintenance to reference a column than to copy paste a formula.
The second Derived Column is going to actually perform the split.
My FirstNameUnicode column uses this formula (FirstCommaPosition > 0) ? RTRIM(LTRIM(RIGHT(Name,FirstCommaPosition))) : "" That says "If we found a comma in the preceding step, then slice out everything from the comma's position to the end of the string and apply trim operations. If we didn't find a comma, then just return a blank string. The default string type for expressions will be the Unicode (DT_WSTR) so if that is not your need, you will need to cast the resultant into the correct string codepage (DT_STR)
My LastNameUnicode column uses this formula (FirstCommaPosition > 0) ? SUBSTRING(Name,1,FirstCommaPosition -1) : "" Similar logic as above except now I use the SUBSTRING operation instead of RIGHT. Users of the 2012 release of SSIS and beyond, rejoice fo you can use the LEFT function instead of SUBSTRING. Also note that you will need to back off 1 position to remove the comma.

Resources