Data Reader load 1st row only
Hi Board Platform, is there way to force a Data reader to load only the 1st row of a file?
Answers
-
Hi Gary,
Is this a sql or ASCII reader and can it be done via an extract and re-load?
1 -
After reading in the file, you can try and extract it with a layout and adding a Counter, then reading back the file with an ETL Validation Condition that only if the Counter column is 1, then read in the record. Let me know if it works!
1 -
To build on what Scott was asking here. If you are using SQL, you can build a function into your SQL select statement to only bring in one line by using TOP 1 in your select statement and as long as it is a valid record based on the configuration of the data reader, it will load into your cube/entities.
1 -
Perhaps, a query like this will work where you'll order a column and then select row 1. Although, there are a number of ways this can be done.
SELECT *
FROM (SELECT column1 FROM table1 ORDER BY column1)
WHERE ROWNUM = 1;0