How to import data (csv or xml file ) to contentful from third party - csv

I want some data which is comeing from third party to be added in contentful , how this we can do ,
eg: How to import csv or xml file in contentful .
I tried UI extension

Related

How would i save a doc/docx/docm file into directory or S3 bucket using Pyspark

I am trying to save a data frame into a document but it returns saying that the below error
java.lang.ClassNotFoundException: Failed to find data source: docx. Please find packages at http://spark.apache.org/third-party-projects.html
My code is below:
#f_data is my dataframe with data
f_data.write.format("docx").save("dbfs:/FileStore/test/test.csv")
display(f_data)
Note that i could save files of CSV, text and JSON format but is there any way to save a docx file using pyspark?
My question here. Do we have the support for saving data in the format of doc/docx?
if not, Is there any way to store the file like writing a file stream object into particular folder/S3 bucket?
In short: no, Spark does not support DOCX format out of the box. You can still collect the data into the driver node (i.e.: pandas dataframe) and work from there.
Long answer:
A document format like DOCX is meant for presenting information in small tables with style metadata. Spark focus on processing large amount of files at scale and it does not support DOCX format out of the box.
If you want to write DOCX files programmatically, you can:
Collect the data into a Pandas DataFrame pd_f_data = f_data.toDF()
Import python package to create the DOCX document and save it into a stream. See question: Writing a Python Pandas DataFrame to Word document
Upload the stream to a S3 blob using for example boto: Can you upload to S3 using a stream rather than a local file?
Note: if your data has more than one hundred rows, ask the receivers how they are going to use the data. Just use docx for reporting no as a file transfer format.

React Native: Read CSV File

I want to upload records of students of a university using CSV file. I have upload the CSV file using react-native-document-picker. Now the problem is that, I am unable to read CSV Data. My main motive is to upload CSV data to firebase. How to read CSV data in React Native or covert CSVtoJSON?
You need to convert CSV to JSON before pushing data to Firebase. There're numerous utility libraries for that. You can try https://www.npmjs.com/package/csvtojson

Read a CSV file and store data in JSON form in Django

I have a CSV file in media folder inside my django project. I want to read the data from the CSV file and store it in JSON format either directly in the database or convert it into JSON from CSV file and then store it, and enable me to view it on an html page, in my Django Web Application.
as I dont know the data format in your csv file i supposed that you have to element in your csv file ...
now you can write your csv file in a list of dictionaries. so you can do anything you want to...
import pandas as pd
csv = pd.read_csv('./your_file.csv')
dataset = []
for i, (item1, item2) in csv.iterrows():
dataset.append({"item1":item1, "item2":item2})

Import csv with paths to pdf files

I have a custom content type (product) containing a title, some text and a file (a pdf file).
A lot of products have to be imported to the Drupal CMS. I discovered the plugin "Feeds" which seems to fulfill my requirements.
I managed to import a csv files containing a title and some text.
Now in my csv file I have a column containing a path to all the pdf files (like C:\mypdfs\product1.pdf). How can I manage that those pdf files are imported by Feeds? In "Mapping" configuration I'm not sure what target I have to select for those column which contains the path to a local file.
Using Feeds Tamper module you can manipulate the value of imported data for one target. Here you can build a custom tamper (See How) and use it to process the retrieved value (file path), using file_get_contents to get the file from imported path and file_save_data to save a file in Drupal, getting a field object that you can attach to an entity (this could help).

CSV Import with custom Identity Part Separator in RavenDb

I'm preparing a csv file to be imported into RavenDb, and have a column named Raven-Entity-Name to specify into which collection the documents have to be imported.
This data will be used by an ASP.NET MVC app, and so that RavenDb's default identity part separator (/) doesn't wreck havoc with my routes, I define a custom one on my app's start-up:
DocumentStore.Conventions.IdentityPartsSeparator = "-";
The csv import actually generates id's using the default separator, is there a way I can specify a custom IdentityPartsSeparator when importing a csv file or is manually generating the id's on the csv file the only option?
No, there isn't. You need to load the csv file using your code to control that.