Questions tagged [flat-file]

A flat-file database model is any system using a single file for storage with one record per line, usually plain-text or text mixed with binary data.

A "flat file" is a plain text or mixed text and binary file which usually contains one record per line or 'physical' record (example on disc or tape). Within such a record, the single fields can be separated by delimiters, e.g. commas, or have a fixed length. In the latter case, padding may be needed to achieve this length. Extra formatting may be needed to avoid delimiter collision. There are no structural relationships between the records.

Typical examples of flat files are /etc/passwd and /etc/group on Unix-like operating systems. Another example of a flat file is a name-and-address list with the fields Name, Address, and Phone Number.

Source: Wikipedia (Flat file database)

830 questions
4
votes
3 answers

What is the best way to generate flat files from templates, and parse them back

Here's the problem I have, I need to generate a flat string file with a rather complex (imposed) structure based on field length and start and stop positions. It file will be generated from a .Net application (data stored in SQL Server). It has…
Gimly
  • 5,975
  • 3
  • 40
  • 75
4
votes
1 answer

Source File Connection (Flat File) - Not reading column metadata

When I create the SSIS package it requires a file to be referenced to pick up the files metadata. For example the column headers will be ColumnA, ColumnB. I have always assumed that these column names need to be present in the file for it to be…
lem
  • 149
  • 7
4
votes
2 answers

MS SQL Server SSIS Import error decimal value

I have the following csv file Column 2,3 2,4 And everytime when I import the data via SSIS Packages I get an error because of the comma value. When I change 2,3 and 2,4 to 2.3 and 2.4 it is working fine. And the values will be stored correctly with…
user8504877
4
votes
3 answers

how to skip a bad row in ssis flat file source

I am reading in a 17-column CSV file into a database. once in a while the file has a "less then 17-column" row. I am trying to ignore the row, but even when all columns are set to ignore, I can't ignore that row and the package fails. How to ignore…
arcee123
  • 101
  • 9
  • 41
  • 118
4
votes
1 answer

In Raymond Hettingers Pycon 2017 Talk, What is the Database Representation

In Raymond Hettinger's Talk he shows a representation for the index of a database. Shown below it's [None, 4, None, 1, None, None, 0, None, 2, None, 3, None, None, None,None] I think he explains it later in the talk but I'm having trouble putting…
canyon289
  • 3,355
  • 4
  • 33
  • 41
4
votes
1 answer

Clearing or Deleting a Ruby PStore

I've been experimenting with PStore to hold relatively large numbers of hash values using: require "pstore" store = PStore.new("data.pstore") Seeing as this is stored in a file full of now-useless data, how do I clear or delete the "store"…
user1051849
  • 2,307
  • 5
  • 26
  • 43
4
votes
3 answers

Is there a flat files JDO implementation?

I have a simple app I'd like to use JDO. But I don't want to use any DB back, just regular file system. Before jdo, I had this class it serializes it object to a file whereas file name is the "primary key". I'd like to be able to do the same thing…
Igor Gatis
  • 4,648
  • 10
  • 43
  • 66
4
votes
1 answer

How to match two to three words in a text file with whitespace in PHP

I am somewhat new to PHP but have created almost everything I need, except one thing which has led me here. I am creating a simple (for you probably but not for me) site for a friend so they can keep track of when they receive rent payments, input…
SharonF
  • 43
  • 3
4
votes
3 answers

read text file from php with post

What is the problem with my code? I've fot two files in the same folder: index.php and pass.txt: This is pass.txt: qwerty And this is index.php:
Kathlyn
  • 233
  • 3
  • 12
4
votes
0 answers

Problems with big fixed-width flat files

I'm trying to read a fixed-width flat file with JRecordBind. Each line can be a subrecord of the previous one and the first line and the last one are header and footer of root record. Example: xxxxxxxxxxxxx -> Record1 header with list of…
mordis84
  • 41
  • 3
4
votes
8 answers

Flat File Connection Manager in SSIS package shows "Valid File Name Must be Selected"

(Flat File Location) Samba Share | Windows Share (SSIS) _______________________________ | | XP 32bit | Works | Works | …
Feckmore
  • 4,322
  • 6
  • 43
  • 51
4
votes
3 answers

SSIS Package Cancels instantly on Debug

I have a rather simple SSIS package that I've used many times to import a tab delimited file into a single table in a database. I attached a new source file to the package and attempted to run the package. The package starts A cmd prompt appears…
SQLJax
  • 582
  • 1
  • 6
  • 23
4
votes
5 answers

processing text from a non-flat file (to extract information as if it *were* a flat file)

I have a longitudinal data set generated by a computer simulation that can be represented by the following tables ('var' are variables): time subject var1 var2 var3 t1 subjectA ... t2 subjectB ... and subject name subjectA nameA subjectB …
hatmatrix
  • 42,883
  • 45
  • 137
  • 231
4
votes
1 answer

Processing a flat file in chunks using multiple threads using producer/consumer pattern and SqlBulkCopy into SQL Server DB

I hope you will bear with me. I wanted to provide as much information as I can. The main problem is how to create a structure (like a stack) that will be used by multiple threads that will pop a value and use it to process one big flat file and…
Rad
  • 933
  • 1
  • 15
  • 32
4
votes
2 answers

key value flat file database simple in C or C++

For a project i am looking for a simple database which is written in C (or C++) for a cross platform aplication. After looking into HamsterDB (which looked promissing) i had found out, that it is dependen on boost on windows. So the alternative…
alfetta
  • 103
  • 2
  • 9