Search code examples
jsoncsvc#-3.0gcloudgoogle-cloud-automl

how to create a CSV in gcloud command?


I am currently trying to search a group of ebooks to learn more about C#. The aim is to ask a question get a page in one or multiple of the ebooks to read. I went to the g_suite chat team and they have kindly directed me to vision commands that was easy enough to follow to make multiple json files. https://cloud.google.com/vision/docs/pdf I want to implement this files in to AUTO ML Natural Language Processing. To do so, a CSV file is required. I do not know how to create a CSV file that would get me past this point and I am currently stuck. How to create a CSV file using gcloud command and should not the Json file be Jsonl file to be accepted? thanks for your answer in advance


Solution

  • The output from the Vision API (service) is a JSON file written to Cloud Storage.

    The input dataset to Auto ML expects the data to be in CSV format and stored in Cloud Storage.

    This isn't a gcloud issue but a general data-transformation problem: transforming JSON to CSV.

    Google Cloud includes services that could help you with this but I suggest you start by writing a script that converts the data (i.e. loads then parses the JSON file creating a CSV file in the required format for Auto ML).

    You may want to Google to see whether others have done similar and use their code as a starting point.

    NOTE IIUC your solution, while an interesting use of these technologies may be overkill. If you're looking to learn Vision API and Auto ML, great. If not, most of this content is available more directly as searchable HTML and text on the web and indeed Stack overflow exists to answer developer questions on a myriad of topics including C#.