dynamobi/dynamobi — Issue #255: [LDB-66] updates to a bcp file do not get read
Author: dynamobi-build
Created: 2011-12-30 02:24:49+00:00
State: open
Labels: Flatfile, LDB

[reporter="schoi", created="Wed, 19 Apr 2006 17:58:03 -0500 (GMT-05:00)"]
If a bcp file gets updated, accessing the foreign table does not seem to read that updated bcp. I need to drop and recreate the foreign server.

repro:

(1) create a directory "files" with 2 files:

- Account.bcp:

6.0

2

1	SQLVARCHAR	0	25	"\t"	1	Id

2	SQLDATETIME	0	24	"\t"	2	SystemModstamp

- Account.txt:

"Id"	"SystemModstamp"

"00130000009dw2QAAQ"	"2005-11-17T23:45:39.000Z"

(2) From sqlline:

create schema flatfile_schema;

set schema 'flatfile_schema';

create foreign data wrapper local_file_wrapper

library 'class com.lucidera.farrago.namespace.flatfile.FlatFileDataWrapper'

language java;

create server ff_server_testacct

foreign data wrapper local_file_wrapper

options (

directory 'files',

file_extension 'txt',

with_header 'yes',

escape_char '',

field_delimiter '\t',

line_delimiter '\r\n',

log_directory 'testlog');

select * from ff_server_testacct.bcp."Account";

Error: FennelResource.en_US.noRowsReturned(/home/schoi/open/luciddb/test/sql/sfdc_flatfile/files/Account.txt, could not calculate results for the following row:

[ '00130000009dw2QAAQ', '2005-11-17T23:45:39.000Z' ]

Messages:

[0]:PC=1 Code=22007 ) (state=,code=0)

(3) update the bcp file:

6.0

2

1	SQLVARCHAR	0	25	"\t"	1	Id

2	SQLVARCHAR	0	24	"\t"	2	SystemModstamp

(4)

select * from ff_server_testacct.bcp."Account";

- returns the same error message.

(5) Drop ff_server_testacct, recreate, and re-run the select => now it works.