How to import CSV file (LOAD CSV) from a remote location? - memgraphdb

I have my CSV data stored on a server that can be accessed via the internet. There is no authorization needed for access to that file. At the moment, I use scp and some crone jobs to copy that file to my Memgrpah server. Then I import data using LOAD CSV.
Is there a way to do something like LOAD CSV FROM "https://my-server.com/files/state.csv" NO HEADER AS row?

At the moment, it is not possible to import remote files into Memgrpah using LOAD CSV. There is an issue opened on GitHub repo so the solution should be available at some point.

Related

How to copy data from one OpenDJ server to another?

How can one copy LDAP records from one OpenDJ server to another ?
Run /opendj/bin/export-ldif, it will output an ldif file that containes everything on your directory server, you can use then /opendj/bin/import-ldif to import the exported data.
If you need the same data, you can just copy OpenDJ data directory from one server to another. The path to OpenDJ data directory specified in instance.loc file.

How to read remote file using urls in Terminal

I would like to know if there is a way to read a file on a remote server using url? For example i have been shared a url to a file on a remote server, i need to read it using bash commands or any tool to retrieve data (eg: view first 50 rows and write to a file) without downloading the original file to local system.
The use case is to avoid downloading/uploading huge files located on the remote server to local systems instead access the file content using the url.
Any resources on this would help.

Datastage : Reading excel from window env. shared folder

I have an Excel file at a shared location on windows environment. I have data stage server on Unix box. I want to read the excel file and load data to a Teradata table. I need help with reading the excel. One option for me is to transfer file to the server location and access it from there but can i read the excel from the shared folder in windows environment?
I tried to use ftp first in datastage. But getting the below error.
<FTP_Enterprise_18> Error occurred during initializeFromArgs().
<FTP_Enterprise_18> uri : ftp://server/path/file.xlsx is not valid remote file.
<main_program> Creation of a step finished with status = FAILED.
No - it is not possible to read it from a remote location so you will need to tranfer it first (if the shared location is not a SAMBA mount on the Unix maschine).
You can use the "Unstructured data" stage to read the Excel fle one it is on the Unix server.

Moved file to another location in Apache NIFI

I am trying to load to MySQL database using LOCAL INFILE however, i am having difficulties to move the files to a new location once they file has been successfully imported in MySql.
Below is a screen show of the process-flow.
My problem is:
I am managed to import/ load the database using the LOAD DATA LOCAL INFILE of MySql but the issue is when I am trying to move the successfully imported files to the correct directory. I fail to achieve so. The PutFile_sucess & PutFile_fail do not work as expected, so I decided to use: FetchFile and then I get an empty file when I say FetchFile it just creates it instead of moving the whole file.
I hope I have made myself clear, I would appreciate any inputs.
if your issue is to remove the file once imported, you could just add a FetchFile processor somewhere after your sucess part and set the Completion Strategy to Delete File
However, better aproach will be to load the content of the file in Nifi then parse/split/process it and then (eventually regroup by batch) ingest the content in MySQL.
Could you maybe improve your question with informations like the format/structure/content of the file you're trying to load ?

generate a CSV file in salesforce and transfer this into another server

I have generated a XML file in Salesforce and now my problem is that i want to transfer this file into another server. Can i connect to another server using FTP, or is there any way out to transfer the file to another server.
This is an urgent task.
Any solutions wud be greatfully accepted.
Phaniraj N
You can't FTP out, where do you store the file in Salesforce? What's the server on the other end?
You could serve the file up as a public page over sites, call a custom web service to transfer it, implement a web service to serve up the file, use data loader to extract from Salesforce on a regular basis and then a batch to upload to the other server, the list goes on but we'll need a bit more information on what you're dealing with!

Resources