flat-file

Android Performance : Flat file vs SQLite

本秂侑毒 提交于 2019-12-28 06:28:23
问题 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. 回答1: 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

SSIS reading LF as terminator when its set as CRLF

冷暖自知 提交于 2019-12-28 02:15:12
问题 using SSIS 2012. My flat file connection manager I have a delimited file where the row delimiter is set to CRLF , but when it processes the file, I have a text column that has an LF in it. This is causing it to read that as a row terminator causing it fail. Any ideas? 回答1: Before answering, i don't think that the column contains only LF because if the row delimiter is CRLF it will not consider it as delimiter. So it is probably CRLF , but i will give a solution for the two cases (CRLF or LF)

SSIS - Perform group by and count on flat file

不打扰是莪最后的温柔 提交于 2019-12-24 15:53:38
问题 I make some transformations and validation on a flat .CSV file to import data. I'd like to add a column with the number of time an employee is present in the flat file for exemple : Input Data Flow : Output Data Flow : I don't know how to transform my dataflow... have an idea? 回答1: This is how I would do it: If your data is not already sorted, sort it on Employee_Id. Use a Multicast to split your data flow into two streams. In one of the streams, add an Aggregate transformation that Groups by

Can SSIS support loading of files with varying column lengths in each row?

落爺英雄遲暮 提交于 2019-12-24 02:15:57
问题 Currently I receive a daily file of around 750k rows and each row has a 3 character identifier at the start. For each identifier, the number of columns can change but are specific to the identifier (e.g. SRH will always have 6 columns, AAA will always have 10 and so on). I would like to be able to automate this file into an SQL table through SSIS. This solution is currently built in MSACCESS using VBA just looping through recordsets using a CASE statement, it then writes a record to the

SQL Server Import Wizard treats NULL as literal string 'NULL'

[亡魂溺海] 提交于 2019-12-23 17:59:32
问题 When I attempt to import a .csv comma-delimited flat file into a Microsoft SQL server 2008R2 64-bit instance , for string columns a NULL in the original data becomes a literal string "NULL" and in a numeric column I receive an import error. Can anyone please help??? 回答1: Put the data into a staging table and then insert to the production table using SQL code. update table1 set field1 = NULL where field1 = 'null' Or if you want to do for a lot of fields update table1 set field1 = case when

How to import data from .txt file to populate a table in SQL Server

放肆的年华 提交于 2019-12-23 01:51:30
问题 Every day a PPE.txt file with clients data, separated by semicolon and always with the same layout is stored to a specific file directory. Every day someone has to update a specific table from our database based in this PPE.txt . I want to automate this process via a SQL script What I thought would be a solution is to import the data via a script from this .txt file into a created table, then execute the update. What I have so far is IF EXISTS (SELECT 1 FROM Sysobjects WHERE name LIKE 'CX

How can one to dynamically parse a CSV file using C# and the Smart Format Detector in FileHelpers 3.1?

*爱你&永不变心* 提交于 2019-12-22 15:00:49
问题 As per in this FileHelpers 3.1 example, you can automatically detect a CSV file format using the FileHelpers.Detection.SmartFormatDetector class. But the example goes no further. How do you use this information to dynamically parse a CSV file? It must have something to do with the DelimitedFileEngine but I cannot see how. Update: I figured out a possible way but had to resort to using reflection (which does not feel right). Is there another/better way? Maybe using System.Dynamic? Anyway, here

Is there an smart way to write a fixed length flat file?

风格不统一 提交于 2019-12-22 03:23:11
问题 Is there any framework/library to help writing fixed length flat files in java? I want to write a collection of beans/entities into a flat file without worrying with convertions, padding, alignment, fillers, etcs For example, I'd like to parse a bean like: public class Entity{ String name = "name"; // length = 10; align left; fill with spaces Integer id = 123; // length = 5; align left; fill with spaces Integer serial = 321 // length = 5; align to right; fill with '0' Date register = new Date

Flat File Database Example

和自甴很熟 提交于 2019-12-21 12:23:36
问题 I would like to see some examples of simple flat file databases and how they are accessed through a data layer. I've written to and read from a flat file before, but I have not ever created a data layer that accessed the data for an application using text files. If possible, it would be nice to see a tutorial that had a data layer that utilized a simple, custom flat file database. An example that saves custom business objects in XML and then uploads them would be nice because XML is so

Flat file destination columns data types validation

强颜欢笑 提交于 2019-12-19 09:48:13
问题 A source database field of type INT is read through an OLE DB Source. It is eventually written to a Flat File Destination. The destination Flat File Connection Manager > Advanced page reports it as a four-byte signed integer [DT_I4] . This data type made me think it indicated binary. Clearly, it does not. I was surprised that it was not the more generic numeric [DT_NUMERIC] . I changed this type setting to single-byte signed integer [DT_I1] . I expected this to fail, but it did not. The