diff --git a/csv_to_json/README.md b/csv_to_json/README.md index 99efdf6..4c89c1e 100644 --- a/csv_to_json/README.md +++ b/csv_to_json/README.md @@ -2,8 +2,21 @@ The CSV to JSON mod provides a convenient and efficient way to convert CSV data from a local CSV file into a JSON format. +## Getting Started + +### Credentials + +No credentials are required. + + ## Usage -- Run the pipeline with the appropriate arguments. +Run the pipeline with the appropriate arguments. + +```sh +flowpipe pipeline run local_csv_file_to_json --arg local_csv_file_path="/Users/bob/Desktop/students.csv" +``` + +### Configuration -- For a local csv file run, `flowpipe pipeline run local_csv_file_to_json --arg local_csv_file_path="/Users/bob/Desktop/students.csv"` +No additional configuration is required. diff --git a/csv_to_json/local_csv_file_to_json.fp b/csv_to_json/local_csv_file_to_json.fp index e67421b..ba95c3f 100644 --- a/csv_to_json/local_csv_file_to_json.fp +++ b/csv_to_json/local_csv_file_to_json.fp @@ -2,6 +2,10 @@ pipeline "local_csv_file_to_json" { title = "Convert Local CSV File To JSON" description = "Read a CSV file and transform it into JSON format." + tags = { + type = "featured" + } + # Input: Path to the CSV file param "local_csv_file_path" { type = string @@ -20,14 +24,9 @@ pipeline "local_csv_file_to_json" { value = file("${param.local_csv_file_path}") } - output "csv_decoded" { - description = "Decoded data from the CSV file." - value = csvdecode(file("${param.local_csv_file_path}")) - } - output "csv_to_json" { description = "CSV file converted to JSON." - value = step.transform.local_csv_file_to_json.value + value = jsondecode(step.transform.local_csv_file_to_json.value) } } diff --git a/csv_to_json/mod.fp b/csv_to_json/mod.fp index 7aefb10..948db9b 100644 --- a/csv_to_json/mod.fp +++ b/csv_to_json/mod.fp @@ -1,5 +1,6 @@ mod "csv_to_json" { - title = "CSV to JSON" - description = "Convert the CSV contents to JSON." - categories = ["productivity"] + title = "CSV to JSON" + description = "Convert the CSV contents to JSON." + documentation = file("./README.md") + categories = ["productivity"] }