https://github.com/linx-software/dynamic-csv-generation
This solution shows how you can dynamically generate a CSV based off a table name that you are passing in. It will dynamically compile the SQL using Linx expressions, and then create a CSV File.
https://github.com/linx-software/dynamic-csv-generation
csv dynamic linx sql
Last synced: 7 months ago
JSON representation
This solution shows how you can dynamically generate a CSV based off a table name that you are passing in. It will dynamically compile the SQL using Linx expressions, and then create a CSV File.
- Host: GitHub
- URL: https://github.com/linx-software/dynamic-csv-generation
- Owner: linx-software
- License: mit
- Created: 2024-02-15T10:38:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-06T06:50:48.000Z (over 1 year ago)
- Last Synced: 2025-02-01T02:43:58.446Z (8 months ago)
- Topics: csv, dynamic, linx, sql
- Homepage: https://linx.software/
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Dynamic CSV Generator
## Description
Generate a CSV file for a MS SQL Server table. The solution contains a single function that given a connection string, table name, and file path, will create a CSV file containing the contents of the table.It uses Linx's capabilities to run dynamic queries and write to text files.
## Usage
#### Try it out
Select the GenerateCSVFromTable function, click Debug, supply values for ConnectionString, TableName, and FilePath parameters, and click Start.#### Use it in your own Linx solution
Copy GenerateCSVFromTable to your solution and call it from anywhere.## Limitations
#### Only works with MS SQL Server
To use it with other databases, change the connection type and SQL properties in the GetCSVHeader and GetCSVData functions.
#### Does not escape the delimiter and line feeds in source data
If the source data contains the delimiter and/or line feeds, the CSV file will be invalid. The function can be extended to cater for these scenarios.## Contributing
For questions please ask the [Linx community](https://linx/software/community).
## License
[MIT](https://github.com/linx-software/template-repo/blob/main/LICENSE.txt)