Use this data provider to select data from CSV files. It is possible to work with local and remote CSV files. One note, if you work with large amount of data (about several thousands records), it is preferable to store data in a database because it will work more slowly with CSV.
On this page administrator can
- Create a new data source using "New" button.
- Edit an existing data source by clicking it's name or by selecting checkbox at left of appropriate data source and clicking "Edit" button.
- Remove data sources by selecting checkbox at left of appropriate data sources and clicking "Delete" button.
Create/edit data source
The following parameters can be defined for data source:
- ID is record number in the database. It is used by "ARI Smart Content" applications to select data source(s) which will be used.
- Name is a name of the data source.
- Description is a description of the data source.
- CSV File is a path to CSV file. If you want to load data from a local file (which is located on the server where Joomla! is installed) enter a relative path based on Joomla! root directory if the file is located in a sub-folder of Joomla! root folder. For example if the path to the file is <joomla_directory>/data/report.csv then populate the parameter with data/report.csv value. Don't use any additional / symbols in this way (for example /data/report.csv because it will be another file path, / is used on Unix system as path to root directory and it is usually differs from Joomla! root directory). If the file is located outside Joomla! root directory then enter full path to the file (for example /home/data/report.csv). If you want to load data from a remote file (file which is located on another server) then specify link to the file (for example https://www.domain.com/data/report.csv).
- Remoting method is used for remote files to specify how to load the file to your server (some method(s) can be disabled on your server). Possible values:
- Auto-detect if this option is selected, the extension tries to select the most appropriate method automatically.
- CURL PHP extension if this option is enabled, the extension will load the file using CURL.
- PHP fopen function if this option is enabled, the file will be loaded via fopen function.
- Socket in this case the file will be loaded using sockets.
If you don't know what value to select, set it to Auto-detect. It should work fine in most cases.
- Heading is used to specify the first row in the file will be used as field names or not.
- Auto-detect mode if the parameter is set to "Yes", the extension will try to detect delimiter which is used in the file automatically otherwise delimiter from Delimiter parameter will be used.
- Strict mode if this parameter is enabled, empty rows and row with incorrect number of columns in the file will be ignored.
- File encoding is used to specify encoding which is used in the file. Populate this parameter only if non-UTF8 encoding is used in the file. Possible values: ISO-8859-1 and etc.
- Delimiter is used to specify delimiter which is used in the file. Possible values: , or ; and etc.
- Enclosure is used to specify symbol which is used for data enclosure.
- Offset number of rows to ignore from beginning of data.
- Limit limit the number of returned rows to specified amount
- Sort by is used to specify name of the field which will be used for default sorting.
- Sort direction is used to specify sort direction.
"Filters" section contains parameters to filter data from the file:
- Column name is a field name.
- Operator is an operator which will be used in filtering expression. It is possible to select the following operators:
- Equals will be selected records where values from column specified in Column name parameter equals value which is defined in Value parameter.
- Contains will be selected records where values from column specified in Column name parameter contains value which is defined in Value parameter.
- Value is a value which will be used in filtering expression.
Other parameters are the same like for SQL queries.