A
Sourcetable Integration

Export Apoc to CSV

Jump to

    Overview

    Understanding the intricacies of data is pivotal in today's technology-driven landscape, and exporting Apoc to CSV files is a critical step in that process. CSV files offer a universally compatible format that eases the integration of data with various Data Science libraries in Python and R, as well as with other tools, making it immensely valuable for analysis and sharing. Particularly beneficial is the ability to load these CSV files into spreadsheet software, providing a familiar interface for data manipulation and insight discovery. On this page, we'll delve into the essence of Apoc, guide you through the process of exporting Apoc to a CSV file, explore practical use cases for such exports, present an alternative to CSV exports for Apoc using Sourcetable, and address common queries about the export procedure.

    Understanding Apoc

    Apoc represents a multi-faceted term that applies to different sectors, including software tools, services, and data. As a software tool, Apoc stands for an accounts payable-on-cloud (APOC) platform offered by Infosys BPM. It is a modular solution that automates and streamlines the accounts payable process, leveraging best-in-class technologies to ensure efficiency, reduce costs, and eliminate payment errors. The platform is delivered on a Business-Process-as-a-Service (BPaaS) model, offers self-service capabilities, ensures on-time payments, and provides visibility into accounts payable data.

    In the realm of services, Apoc is also recognized as a distinct typeface designed by Matthieu Salvaggio and released in 2018 with updates in 2020 and 2022. Apoc encompasses several variations including Normal, Revelations, and Sans, each with multiple styles and features such as case sensitive forms, standard ligatures, alternate glyph styles, and various figure styles. It is described as an elegant, sharp, and expressive font family, ideal for creating bold standout displays in website headlines, art exhibition posters, and album covers.

    Regarding data, the term Apoc refers to a function within a data context, specifically the apoc.meta.types function that, although now deprecated, was used to return a map of keys to types for a node-relationship-map. This function was part of the broader suite of tools and functions utilized for managing and interpreting data.

    Exporting Apoc Data to CSV

    Exporting the Entire Database

    The apoc.export.csv.all procedure allows for exporting the entire database into a CSV file or as a stream. To enable file system exporting, set the apoc.export.file.enabled property to true in apoc.conf. The exported CSV file will be located in the import directory, relative to which the file path should be provided. This procedure can also be used with the config bulkImport to create files for Neo4j Bulk Import, resulting in files named according to the pattern inputFilename.nodes.[LABEL_NAME].csv for nodes and inputFilename.relationships.[TYPE_NAME].csv for relationships.

    Exporting Specified Data

    To export specific nodes and relationships, use the apoc.export.csv.data procedure. This will export the defined data sets to a CSV file or as a stream. Similar to the full database export, ensure that exporting to the file system is enabled by configuring the apoc.export.file.enabled property in apoc.conf. Files are again written to the import directory.

    Exporting Virtual Graphs

    The apoc.export.csv.graph procedure is designed to export a virtual graph to a CSV file or as a stream. An example of such use is exporting nodes connected by the PRODUCED relationship, including nodes on either side. The resulting CSV files can also be formatted for use with Neo4j Bulk Import, creating labels-specific files like .nodes.[LABEL_NAME].csv for nodes and .relationships.[TYPE_NAME].csv for relationships.

    Configuring Export Settings

    Before exporting, it is essential to configure the environment correctly. By default, both file system and S3 exporting are disabled. Enable them by setting the apoc.export.file.enabled property to true in the apoc.conf file. When exporting to an S3 bucket, you must replace the file output with an S3 endpoint and be aware that the S3 uploading utility can use up to 2.25 GB of memory.

    Exporting to S3

    For exporting directly to an S3 bucket, apart from enabling the export functionality, it is necessary to download and copy the required jars into the plugins directory. The file output is substituted with an S3 endpoint to facilitate the export.

    Exporting as a Stream

    If exporting to a file is not required, you can export data as a stream. The results will be returned in the data column, which can be particularly useful for immediate processing or integration with other applications.

    A
    Sourcetable Integration

    Streamline Your Data Management with Sourcetable

    Experience the seamless integration of your Apoc data directly into a versatile spreadsheet without the cumbersome steps of exporting to a CSV file. Sourcetable offers a sophisticated solution that syncs your live data from various applications or databases, including Apoc, into a single, intuitive interface. By eliminating the need to export and then import data, you save valuable time and reduce the risk of errors that can occur during the data transfer process.

    With Sourcetable, you can automatically pull in data from multiple sources and effortlessly query it using a familiar spreadsheet format. This not only enhances automation but also significantly boosts your capacity for insightful business intelligence. Sourcetable's ability to synchronize with your live data ensures that your spreadsheets are always up-to-date, providing you with the most current insights for better decision-making. Choose Sourcetable for a more efficient and accurate approach to data management.

    Common Use Cases

    • A
      Sourcetable Integration
      Sharing query results via a CSV file for collaboration or reporting
    • A
      Sourcetable Integration
      Importing data from Neo4j into other tools using a CSV file exported to S3
    • A
      Sourcetable Integration
      Backing up Neo4j data by exporting to S3 for disaster recovery purposes
    • A
      Sourcetable Integration
      Integrating Neo4j data with other systems by exporting to S3
    • A
      Sourcetable Integration
      Storing and analyzing virtual graphs through the export of static value storage to a CSV file




    Frequently Asked Questions

    How do I export the whole Neo4j database to a CSV file using Apoc?

    You can export the entire database to a CSV file using the apoc.export.csv.all procedure by calling CALL apoc.export.csv.all with a file name and a configuration map argument. The file name argument is required. By default, file system export is disabled, so ensure that you have set apoc.export.file.enabled=true in apoc.conf.

    Can I export data as a stream instead of a file when using Apoc to CSV?

    Yes, by using the stream:true configuration option, you can stream the results instead of exporting them to a file. This can be set when using procedures like apoc.export.csv.all, apoc.export.csv.data, and apoc.export.csv.graph.

    How do I enable exporting to the file system or S3 when using Apoc?

    To enable exporting to the file system or to S3, set the apoc.export.file.enabled property to true in apoc.conf. For S3, you will also need to replace the file output with an S3 endpoint URL formatted correctly.

    Is it possible to export the results of a specific Cypher query to CSV with Apoc?

    Yes, the apoc.export.csv.query procedure allows you to export the results of a Cypher query to a CSV file or as a stream. You will need to provide the Cypher query as input and can also specify various configuration parameters like batchSize and delim.

    How can I configure the CSV file format when exporting data from Apoc?

    When exporting data, you can define several aspects of the CSV format using configuration parameters such as batchSize (to set the batch size), delim (to define the delimiter character), quotes (to define the quote character), arrayDelim (to set the array delimiter character), and useTypes (to add type information to the file header).

    Conclusion

    The export procedures of Apoc provide extensive flexibility in exporting data to CSV format, compatible with popular data science libraries in Python and R. With the capability to export the entire database, specific nodes and relationships, or the results of a Cypher query, the procedures adapt to a variety of use cases. Export functionality to both the file system and S3 is disabled by default but can be easily enabled through configuration settings. Keep in mind that exporting to S3 may require substantial memory. The procedures also support streaming data, allowing for efficient data handling. However, if you want to bypass the complexities of exporting to CSV and streamline your workflow, consider using Sourcetable to import data directly into a spreadsheet. Sign up for Sourcetable now to simplify your data import process and get started right away.

    Start working with Live Data

    Analyze data, automate reports and create live dashboards
    for all your business applications, without code. Get unlimited access free for 14 days.