flat-file

Replace NAs in a ffdf object

馋奶兔 提交于 2019-11-30 14:23:55
问题 I`m working with a ffdf object which has NAs in some of the columns. The NAs are the result of a left outer merge using merge.ffdf .I would like to replace the NAs with 0s but not managing to do it. Here is the code I am running: library(ffbase) deals <- merge(deals,rk,by.x=c("DEALID","STICHTAG"),by.y=c("ID","STICHTAG"),all.x=TRUE) attributes(deals) $names [1] "virtual" "physical" "row.names" $class [1] "ffdf" vmode(deals$CREDIT_R) [1] "double" idx <- ffwhich(deals,is.na(CREDIT_R)) # CREDIT_R

Flat file databases [closed]

左心房为你撑大大i 提交于 2019-11-30 06:14:35
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . What are the best practices around creating flat file database structures in PHP? A lot of more matured PHP flat file frameworks out there which I attempt to implement SQL-like query syntax which is over the top for my purposes in most cases. (I would just use a database at

C#: Convert COMP-3 Packed Decimal to Human-Readable Value

给你一囗甜甜゛ 提交于 2019-11-29 14:50:23
问题 I have a series of ASCII flat files coming in from a mainframe to be processed by a C# application. A new feed has been introduced with a Packed Decimal (COMP-3) field, which needs to be converted to a numerical value. The files are being transferred via FTP, using ASCII transfer mode. I am concerned that the binary field may contain what will be interpreted as very-low ASCII codes or control characters instead of a value - Or worse, may be lost in the FTP process. What's more, the fields are

Why doesn't SSIS recognize line feed {LF} row delimiter while importing UTF-8 flat file?

笑着哭i 提交于 2019-11-28 20:14:54
I am trying to import data from a utf-8 encoded flat file into SQL Server 2008 using SSIS. This is what the end of the row data looks like in Notepad++: I have a couple more images showing what the file connection manager looks like: You can see that the data shows correctly in the file connection manager preview. When I try to import this data, no rows import. I get an error message indicating that the row delimiter was not found. You can see in the file connection manager images that the header row delimiter and the row delimiter are both set to {LF} . This was sufficient to generate the

Flat file databases [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 15:50:39
What are the best practices around creating flat file database structures in PHP? A lot of the more mature PHP flat file frameworks I see out there attempt to implement SQL-like query syntax, which is over the top for my purposes in most cases (I would just use a database at that point). Are there any elegant tricks out there to get good performance and features with a small code overhead? w-ll Well, what is the nature of the flat databases. Are they large or small. Is it simple arrays with arrays in them? if its something simple say userprofiles built as such: $user = array("name" => "dubayou

Importing a txt file into SQL Server with a where clause

不羁的心 提交于 2019-11-28 10:58:45
问题 I have a .txt file which is 6.00 GB. It is a tab-delimited file so when I try to load it into SQL Server, the column delimiter is tab. I need to load that .txt file into the database, but I don't need all the rows from the 6.00 Gb file. I need to be able to use a condition like select * into <my table> where column5 in ('ab, 'cd') but this is a text file and am not able to load it into db with that condition. Can anyone help me with this? 回答1: Have you tried with BULK INSERT command? Take a

SSIS - Flat file always ANSI never UTF-8 encoded

删除回忆录丶 提交于 2019-11-28 07:33:16
Have a pretty straight forward SSIS package: OLE DB Source to get data via a view, (all string columns in db table nvarchar or nchar). Derived Column to format existing date and add it on to the dataset, (data type DT_WSTR). Multicast task to split the dataset between: OLE DB Command to update rows as "processed". Flat file destination - the connection manager of which is set to Code Page 65001 UTF-8 and Unicode is unchecked. All string columns map to DT_WSTR. Everytime I run this package an open the flat file in Notepad++ its ANSI, never UTF-8. If I check the Unicode option, the file is UCS-2

Is it faster to access data from files or a database server?

…衆ロ難τιáo~ 提交于 2019-11-28 04:28:42
If I have a static database consisting of folders and files, would access and manipulation be faster than SQL server type databases, considering this would be used in a CGI script? When working with files and folders, what are the tricks to better performance? HerbN I'll add to the it depends crowd. This is the kind of question that has no generic answer but is heavily dependent on the situation at hand. I even recently moved some data from a SQL database to a flat file system because the overhead of the DB, combined with some DB connection reliability issues, made using flat files a better

SSIS ragged file not recognized CRLF

心已入冬 提交于 2019-11-28 01:32:32
In SSIS, I try to load data from a flat file. The flat file have fixed width columns, but some column are not present in a row (a column can have a CRLF, which must be a new line) like this a b c the first rowok<CRLF> iu jjrjdd<CRLF> this is a newline<CRLF> How I can have exactly the same number of line and exact data in my output ? I setup a flat file connection, of ragged right type. In this sample, row 1 is correctly retrieve, but for row 2, it didn't recognize CRLF, and put in b column all the 3rd row ... thanks in advance Regards, Xavier Workaround In the flat file connection manager read

Android Performance : Flat file vs SQLite

走远了吗. 提交于 2019-11-28 00:39:11
There are few questions related to this topic on stackoverflow, But I didn't get the proper answer. I have some doubts on performance of flat files, Is it better to use flat files instead of SQLite ? Can anybody have performance statistics ? Or example of proper way to code flat file in android. Aside from performance benefits, here's a simple list of advantages of using SQLite rather than flat file: You can query items as you wish -- don't need to load all of them and select which ones you need. Deleting records is a much less painful process. No rewriting of whole files into wherever.