-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a141d7
commit dc14017
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# CSV Extractor | ||
|
||
The csv extractor can be used to get data from comma separated files with or without a header row. | ||
|
||
## Options | ||
|
||
| Name | Type | Default | Description | | ||
| ---- |----- | ------- | ----------- | | ||
| columns | array | null | Columns that will be extracted. | | ||
| delimiter | string | , | Field delimiter (one character only). | | ||
| enclosure | string | | Field enclosure character (one character only). | | ||
|
||
|
||
## Usage | ||
|
||
Default options: | ||
```php | ||
$etl->extract('csv', 'path/to/file.csv'); | ||
``` | ||
|
||
Custom options: | ||
```php | ||
$options = [ | ||
'columns' => [ | ||
'id' => 1, // Index of the column in the csv file (The first column is 1). | ||
'name' => 2 | ||
] | ||
]; | ||
|
||
$etl->extract('csv', 'path/to/file.csv', $options); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Extractors | ||
|
||
* [Collection](Collection.md) | ||
* [CSV](Csv.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters