All Questions
1,573 questions
0
votes
2
answers
155
views
Is there any simple way to transform jsonb field into csv? [closed]
I have a model with a jsonb field where responses from a third-party service are stored. The response changes periodically; some fields are added, some disappear. I want to generate a CSV from a ...
1
vote
1
answer
48
views
convert csv file with json data inside to a column, rows table in 2nd csv file
Ruby newbtard here...
I have an csv file (logevents.csv) that has a "message" column.
The "message" column contains rows of json data.
Using Ruby, I'd like to convert the json data'...
0
votes
1
answer
72
views
ENOENT Error when trying to create Excel file in Ruby
EDIT 2: I've managed to resolve the directory issue and it creates the CSV file without issue, however when I try to export the file as a XLSX file using the save_to_xlsx method, the program still ...
0
votes
1
answer
51
views
Input Output from CSV in Ruby. console output different from file output
I am learning the csv application in ruby.
I have a function which takes a string and looks up words against it based on starting alphabet
Now i am trying to read a file which has lots of strings and ...
0
votes
1
answer
90
views
Parsing from CSV in Ruby [closed]
I'm trying to get rows from a CSV file without headers.
require "csv"
filepath = "data/beatles.csv"
csv_options = { col_sep: ',', quote_char: '"', headers: :first_row }
CSV....
0
votes
2
answers
160
views
Logstash replace colon with arrow
My goal is to read data from kinesis and upload csv file on s3, but in csv file arrow(=>) is coming in json data insted of colon(:)
Logstash config file
input {
kinesis {
application_name =&...
1
vote
1
answer
338
views
Processing A CSV With Every Line Wrapped In Double Quotes
Oh boy, my first Stack Overflow question! One of our clients is sending us a CSV file to process, but the way they're sending it, every single line is wrapped in double quotes:
"example, header, ...
0
votes
1
answer
145
views
Decoding Amazon Reports in CP932 with Ruby
Reports out of Amazon's SP-API are generally in UTF-8 except for the ones out of Japan, which are in CP932.
I cannot seem to figure out how to decode these into usable data.
Running Ruby 3.1.2 and ...
0
votes
2
answers
61
views
Iterate through a nested array and resultSet
I have a resultset which I get from a data table
Then I am exporting this to a CSV file. However, I have a bug in the way I am doing when it has many resultSets.
So usually when is less than 5000 I ...
0
votes
2
answers
312
views
Ruby and CSV - How to get a column value after filtering rows
I have parsed a CSV file with headers of ID, Name, and Address. I need to find the row(s) in the data that have a particular ID and Name. Once I find that row, I need to access the Address value.
data ...
1
vote
1
answer
425
views
SmarterCSV end of file reached, but ruby's CSV library can process the file
I have two CSV files which are basically the same, but for some reason, SmarterCSV can not read the one named bad_file Here is a Gist of both files. Ruby's native CSV library can read bad_file no ...
0
votes
1
answer
25
views
Outputting single row from CSV file from specific header name
In ruby 3.1.2, using this CSV file:
make,model,color,doors,email
dodge,charger,black,4,[email protected]
ford,focus,blue,5,[email protected]
nissan,350z,black,2,[email protected]
mazda,...
0
votes
1
answer
35
views
Allowing a user to edit a CSV file
In Ruby 3.1.2, using this CSV file:
make,model,color,doors,email
dodge,charger,black,4,[email protected]
ford,focus,blue,5,[email protected]
nissan,350z,black,2,[email protected]
mazda,...
0
votes
1
answer
45
views
How to make user input to csv update the actual csv file
In ruby 3.1.2, I have this csv file:
make,model,color,doors,email
dodge,charger,black,4,[email protected]
ford,focus,blue,5,[email protected]
nissan,350z,black,2,[email protected]
mazda,...
0
votes
1
answer
81
views
Ruby: How to make program return nil if there is nothing in location of table
In Ruby I have this csv file:
make,model,color,doors,email
dodge,charger,black,4,[email protected]
ford,focus,blue,5,[email protected]
nissan,350z,black,2,[email protected]
mazda,miata,...