Frequently Asked Questions

Low-Code CSV Batch Importer for Hygraph

What is the purpose of a low-code CSV batch importer for Hygraph?

The low-code CSV batch importer for Hygraph enables teams to import large volumes of content quickly and easily, even if they have minimal coding experience. By leveraging low-code tools like Retool, content editors and creators can participate directly in the import process, reducing reliance on developers and catching errors early in the workflow. (Source)

Why would someone want to use a low-code importer with Hygraph?

Using a low-code importer allows non-technical users, such as content editors and creators, to import data without writing code. This approach empowers those who understand the content best to manage imports, reduces bottlenecks, and helps catch errors at the time of import rather than later in staging or production. (Source)

What is a low-code tool and how does it help with content import?

A low-code tool abstracts programming logic into drag-and-drop utilities and flow diagrams, making app and script building accessible to a wider audience. For content import, it allows users to map, edit, and transform data visually, reducing the need for custom scripts and minimizing errors. (Source)

What requirements should a low-code tool meet for importing data into Hygraph?

The tool should support mapping large datasets to tables (with pagination), work in protected environments (using secrets or access controls), and allow writing custom queries to interact with Hygraph's GraphQL API. It should also enable column renaming and bulk editing. (Source)

Which low-code platforms are suitable for building a CSV importer for Hygraph?

Platforms like Retool, Bubble.io, OutSystems, Mendix, Microsoft PowerApps, and open-source options like ToolJet can be used. Retool is highlighted for its excellent GraphQL support and fast onboarding. (Source)

What are the main steps to build a CSV batch importer for Hygraph using Retool?

The main steps include: uploading a CSV, enabling bulk edits, renaming columns, paginating through the CSV to avoid API limits, mapping columns, transforming data, and executing GraphQL mutations to import data into Hygraph. (Source)

How does the column mapping and transformation work in the CSV importer?

Column mapping is achieved by creating a key-value store of original and new column names. The importer uses this mapping to transform each row of the CSV, allowing users to rename columns before import. This ensures data aligns with the Hygraph schema. (Source)

What are the limitations of batch importing CSVs into Hygraph?

Hygraph does not currently support creating or upserting many records at once natively, so workarounds such as using unique constraints and upsert mutations are required. There are also API rate limits and potential risks of duplicate content if unique fields are not set correctly. (Source)

How do you handle API rate limits when importing large CSV files into Hygraph?

The importer paginates through the CSV data, processing a subset of rows at a time (e.g., five rows per page), to stay within Hygraph's batch operation limits (up to 1000 operations per batch). This approach helps avoid hitting API rate limits during large imports. (Source)

Can you edit CSV data before importing it into Hygraph?

Yes, the importer allows for bulk editing of CSV data within the low-code tool before import. Users can make changes directly in the table component, ensuring data is clean and accurate prior to submission. (Source)

What is the recommended order for importing related data sets into Hygraph?

It's best to start with the least interdependent data (e.g., colleges), then move to more interdependent sets (e.g., faculty, courses). Persisting original identifiers (IDs) helps maintain relationships across systems during import. (Source)

How do you generate an import token for Hygraph?

To track and control imports, you can generate a specialized import token in Hygraph. This token can be revoked if necessary and should be used for authentication during the import process. For more details, see the Hygraph authorization documentation.

What are some best practices for transforming and cleaning CSV data before import?

It's recommended to use a CSV manipulation tool to delete unnecessary columns and perform large-scale data transforms before importing. Within the low-code tool, you can further edit, map, and filter columns to ensure only relevant data is imported into Hygraph. (Source)

How do you execute the import mutation in Retool for Hygraph?

After transforming and mapping your data, you configure a GraphQL mutation in Retool, set the variables to use the transformed data, and execute the mutation using a button in the interface. Each CSV may require a different mutation shape, but the process remains the same. (Source)

What are some potential pitfalls when importing CSVs into Hygraph?

Potential pitfalls include API rate limits, risk of duplicate content if unique constraints are not set, and the need for workarounds due to lack of native batch upsert support. It's important to plan the import order and use unique identifiers to avoid data integrity issues. (Source)

Can you reuse the low-code CSV importer logic for different data sets?

Yes, the logic for mapping, transforming, and paginating data can be reused for different CSVs and data sets. Only the mutation shape may need to be adjusted for each specific import. (Source)

What is the benefit of using a low-code tool like Retool for Hygraph imports compared to custom scripts?

Low-code tools like Retool provide a visual interface, faster onboarding, and empower non-developers to manage imports. This reduces developer bottlenecks and allows for real-time data cleaning and mapping, making the process more accessible and efficient. (Source)

How does Hygraph's API support low-code and batch import workflows?

Hygraph offers robust GraphQL APIs that can be accessed from various programming languages and low-code tools. The API supports both content and management operations, enabling flexible import workflows and integration with tools like Retool. (Source)

What documentation is available for importing data into Hygraph?

Hygraph provides extensive documentation on its API, schema modeling, and authorization. For importing data, refer to the API Reference Documentation and Schema Models Documentation.

Features & Capabilities

What APIs does Hygraph provide for content import and management?

Hygraph offers several APIs: Content API (read & write), High Performance Content API (low latency, high throughput), MCP Server API (for AI assistants), Asset Upload API, and Management API. These APIs support a wide range of import, export, and management workflows. (Source)

Does Hygraph support integrations with other tools for content import?

Yes, Hygraph integrates with various Digital Asset Management (DAM) systems (e.g., Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot) and other platforms like Adminix and Plasmic. Developers can also build custom integrations using SDKs and APIs. (Source)

What performance optimizations does Hygraph offer for large-scale imports?

Hygraph provides high-performance endpoints designed for low latency and high read-throughput, as well as Smart Edge Cache for faster content delivery. Performance is actively measured and optimized, as detailed in the High-Performance Endpoint blog post and GraphQL Report 2024.

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (since August 3, 2022), ISO 27001 certified, and GDPR compliant. It offers enterprise-grade features like granular permissions, audit logs, SSO, encryption, and regular backups. (Source)

What technical documentation is available for Hygraph users?

Hygraph provides comprehensive documentation covering API references, schema components, references, webhooks, and AI integrations. Access all resources at the Hygraph Documentation page.

Use Cases & Benefits

Who can benefit from using Hygraph's low-code CSV batch importer?

Content editors, creators, and non-technical staff who need to import large datasets into Hygraph can benefit from the low-code CSV batch importer. It is especially useful for teams migrating legacy data, managing frequent content updates, or onboarding new projects quickly. (Source)

What business impact can customers expect from using Hygraph?

Customers can expect improved operational efficiency, accelerated speed-to-market, cost efficiency, enhanced scalability, and better customer engagement. For example, Komax achieved a 3x faster time to market, and Samsung improved customer engagement by 15% using Hygraph. (Source)

What industries are represented in Hygraph's case studies?

Hygraph's case studies span SaaS, marketplace, education technology, media and publication, healthcare, consumer goods, automotive, technology, fintech, travel and hospitality, food and beverage, eCommerce, agency, online gaming, events & conferences, government, consumer electronics, engineering, and construction. (Source)

Can you share specific success stories of customers using Hygraph?

Yes. Samsung built a scalable, API-first application; Komax achieved 3x faster time to market; AutoWeb increased website monetization by 20%; Voi scaled multilingual content across 12 countries and 10 languages. See more at the Hygraph case studies page.

What pain points does Hygraph solve for its customers?

Hygraph addresses operational inefficiencies (developer dependency, legacy tech stacks, content inconsistency), financial challenges (high costs, slow speed-to-market, scalability), and technical issues (complex schema evolution, integration difficulties, performance bottlenecks, localization, and asset management). (Source)

How does Hygraph differentiate itself from other CMS platforms?

Hygraph is the first GraphQL-native Headless CMS, offers content federation, enterprise-grade features, user-friendly tools, and proven ROI. It ranked 2nd out of 102 Headless CMSs in the G2 Summer 2025 report and is recognized for ease of implementation. (Source)

Pricing & Plans

What pricing plans does Hygraph offer?

Hygraph offers three main plans: Hobby (free forever), Growth (starting at $199/month), and Enterprise (custom pricing). Each plan includes different limits and features tailored to individual, small business, or enterprise needs. (Source)

What features are included in the Hygraph Hobby plan?

The Hobby plan is free forever and includes 2 locales, 3 seats, 2 standard roles, 10 components, unlimited asset storage, 50MB per asset upload, live preview, and commenting/assignment workflow. (Source)

What features are included in the Hygraph Growth plan?

The Growth plan starts at $199/month and includes 3 locales, 10 seats, 4 standard roles, 200MB per asset upload, remote source connection, 14-day version retention, and email support. (Source)

What features are included in the Hygraph Enterprise plan?

The Enterprise plan offers custom limits, version retention for a year, scheduled publishing, dedicated infrastructure, global CDN, security and governance controls, SSO, multitenancy, one-click backup recovery, custom workflows, dedicated support, and custom SLAs. (Source)

Support & Implementation

How long does it take to implement Hygraph?

Implementation time varies by project complexity. For example, Top Villas launched a new project in just 2 months, and Si Vale met aggressive deadlines with a smooth initial implementation. (Source)

What resources are available to help new users get started with Hygraph?

Hygraph offers a free API playground, free forever developer account, structured onboarding (introduction, account provisioning, business/technical/content kickoff), training resources (webinars, videos), extensive documentation, and a community Slack channel. (Source)

What feedback have customers given about Hygraph's ease of use?

Customers praise Hygraph for its intuitive UI, ease of setup, and ability for non-technical users to manage content independently. Some users note that it can be complex for less technical users, but overall feedback is positive. (Source)

Introducing Click to Edit

Creating a Low-Code, CSV Batch Importer for Hygraph

In this guest post, Jesse Martin creates a low-code batch importer for Hygraph, enabling teams to import their content quickly and easily.
Jesse Martin

Written by Jesse 

Feb 02, 2022
creating-a-low-code-csv-batch-importer-for-graphcms

In this example, I will demonstrate how to build a Low-Code CSV batch importer for Hygraph. This can be helpful to teams working with low-code tools because it is specifically a “batch” importer, which many low-code tools don’t support and uses a bit of a workaround with GCMS to actually run the batch import by creating an import relation.

A good headless CMS is marked by a good API. Hygraph has a great API. A CMS offering an API interface should lend itself to a smooth data import and export operation. Fortunately, again, Hygraph offers great support for this. Whether you are using the management and content APIs in tandem to model and import your content, or you are using just the content APIs to import and export your content, the API is able to support whatever pattern and tooling you’ve chosen.

Picking the right tool, however, can be more complex. GraphQL APIs can be accessed with any number of languages from JavaScript to Java. Writing a small library of import utilities is a straightforward task.

If you know how to code.

#Why Create a Low-code Importer?

While there’s great documentation on how to programmatically import content with custom scripting, not everyone knows how to code. Being able to leverage a low-code environment where we abstract as much of the code away as possible, enables content editors and creators to help with importing their content without needing additional dev resources.

And as the editors and creators are the ones who understand the content best, it becomes an invaluable opportunity to catch any import errors at the time of import, and not later in staging, or worse, production.

#What is a Low-code Tool?

A low-code tool, sometimes referred to as a no-code tool, is a tool that abstracts the conditional logic and function calls that programmers work with when building apps and scripts, into drag-and-drop utilities and flow diagrams that are more approachable to a larger audience.

And don’t make the mistake to think low-code is simply for those who haven’t learned how to code yet. Low-code is an $11 billion market with more enterprises embracing low-code solutions every day. The visual auditing process and smaller surface area for bugs make for a very compelling use case for companies of all shapes and sizes.

#Our Low-code Tooling Requirements

Solving the problem of data importing will require a special category of low-code tooling, however. We’ll need a tool capable of mapping large amounts of data to tables, ideally with pagination, and something that works well with protected environments, i.e., we can use secrets or make sure that only those we trust are using the application.

We refine our requirements even further because Hygraph doesn’t have any REST endpoints, and so we need a tool that allows us to write to our API where we can customize the information that is sent, namely, writing a custom query. We won’t be able to keep our hands completely clean of code, but we’ll keep it to a minimum, I promise!

There are a few options that are capable of handling this task, some of them are quick to set up and suit themselves to faster onboarding like Bubble.io, or Retool, whereas others are focused on a higher-touch onboarding process like OutSystems and Mendix. One could even configure Powerapps from Microsoft to accomplish much of this workflow, as well!

Let us know if that’s something you’d like to see. If you are looking for an open-source option, ToolJet may be something for you.

#Introduction to Retool

The tool we’ll be using is Retool, for one very particular reason, and that is excellent support for GraphQL! The platform lends itself to fast onboarding, the ability to self-host for sensitive contexts, and a clean interface that is simple to reason about.

#Tutorial

What are we Going to Build?

We’ll make the assumption that our content team needs to import a number of CSVs to our model, so we’ll allow for uploading new CSVs to import into the future. We’ll need the following components:

  1. An ability to upload a CSV.

  2. An ability to make some bulk edits if needed.

  3. An ability to rename columns.

  4. An ability to paginate through the CSV so we don’t go over our API limits.

    What Does our Dataset Look Like?

The dataset we are going to work with is a contrived example of educational institutions (academies, colleges, universities) with faculty and courses. Our rough database diagram looks like this:

data diagram.png

Our target graph structure will ideally be a little more normalized at the end. Note, Hygraph abstracts away the join tables (i.e. Faculty_skills – so we won’t be creating this model by hand.)

goal data abstraction with hygraph

The Source Content

Let’s preview our source content to see what we have to work with. Since this tutorial is about importing CSVs, that’s the structure of our data.


Courses

1,Synergistic static database,"In congue. Etiam justo. Etiam ...",5,"[{""id"":15},{""id"":636},{""id"":782},{""id"":553}]",134,6,UtVolutpat.tiff

Faculty

1,Fair,Ryder,fryder0@java.com,"Morbi porttitor lorem id ligula...","[{""title"":""Japanese Language Proficiency Test"",""years"":30},{""title"":""Program Evaluation"",""years"":22}]",http://dummyimage.com/x.png/ff4444/ffffff,5

Colleges

1,California,California Maëlla Academy,0131 Weeping Birch Court

Create a CSV Read Utility in Retool

Our first process will be to create a utility in Retool to upload and read a CSV. Creating an account in Retool is a matter of signing up for the service and we won’t go over that in detail here. Once you have a Retool application open and you are ready to edit, we’ll begin by deleting the default table provided so that we have a clean screen.


Start by adding a File Button, and a Table from the components sidebar.


add file to components sidebar.png


components configure table.png


You can see how this looks in the following image.

blank table CSV importer.png

I’ll rename my components to “upload” and “recordBrowser” respectively. You can do this in the inspector.

recordBrowser components.png

Alright, we have a minimal layout already taking shape! Let’s support parsing the values from our upload behavior, you might have already tried clicking on the File Button and seen that it already lets us browse our filesystem. Go ahead and find a CSV you’d like to work with, you can find the sample CSVs for this tutorial linked at the bottom of this page. We’ll use the “courses.csv” as an example.

Iterating Over the CSV

Select the table component and navigate to the inspector panel, here we can see the “Data” column, this is where we’ll add the data that gets looped over. Replace any existing values with the following dynamic values.

data_upload.parsedValue.png

In Retool, the {{...}} syntax means we are using a dynamic variable. We are grabbing the component of our Upload Button (that we renamed to ‘upload’) and grabbing the parsedValue, where the first element in the parsedValue array is the actual data. I’m providing an “or” operator “||” to tell the component, if you don’t see any data, then you can use an empty array so that the interface doesn’t show us errors.

You should now see your data in the table!

Support Editable Content

Out of the box, we get pagination and filters on the table component. We’ll leverage those later. Sometimes, when we are transforming content from one system to another, we may want to take advantage of some data cleaning. We can define one or more of these columns as “editable”.

Begin by selecting the table where our data is present. In the Inspector, we’ll scroll down to the columns section where we can see all the columns our CSV has. Click on the top-level “Editable” checkbox which will make each cell editable by default. Once you’ve done this once, you won’t need to do this again as long as the schema for the CSV is the same, if you use additional CSVs, you’ll need to do this for each CSV. If you want to do this on only a limited subset of columns, you can.

editable columns.png

Creating a Key Mapper in Retool

Many times the column names of your CSV don’t match up to the new names you want to import your data into. Let’s make a transformer utility that will let us convert our data.

Drag a “ListView” component onto the canvas.

creating a key mapper_list view.png

We’ll rename this component to ‘keyChange’. We’ll need an additional feature of Retool to unlock our full potential here.

First, we’ll create a piece of temporary state. You’ll find that in the right-hand sidebar. If that’s hidden, you can show it by clicking on the far-left side, here.

right handed sidebar.png

Make a new state called ‘keyMapper’. We want to populate this key/value store with the column names from our CSV. To do this, we’ll define an interaction after we upload a CSV. Selecting the upload button, we’ll define the event to watch for as the “parse” event of the file being uploaded.

parse event handlers.png

We’ll tell the action to be setting the temporary state of our keyMapper, setting the value defined in our little bit of code.

Our code takes the parsed value, grabs the keys (or column names), and creates an object of the column name and a temporary copy of the same column name called alt. This ends up with a list of objects such as [{column: “name”, alt: “name”},{column: “location”, alt: “location”}].

adding values parse handler.png

With our state set up as a key/value pair of our column names, we need to update our keyChange component to run over these values. We do this by telling the list component how many rows to expect, followed by what to do for each row.

Telling the component how many rows is straightforward.

row configuration component.png

The number of rows is a property called “length” of the keyMapper value. Again, this is a dynamic value so we access this by using the {{}} pairing. Row keys is a performance optimization that allows Retool to keep track of the addition/removal of rows.

Mapping/Row Keys Explained

We can synthesize some values here by mapping (looping) over the values of our key/value store and returning the index/position (i) of that list. While this might look confusing, we are simply turning a list such as [a,b,c] into a list of [0,1,2] which lets us force a unique value. I might have a list of [a,a,b] which would not have only unique values, but it will always be [0,1,2,...] for every item I have.

Inside of the list component we drag an input component, which lets us provide a temporary value and a label.

text input.png

The configuration for this component is as follows.

textInput1.png

We reference the value of the state we filled with column name pairings. We then reference the “i” value (position in the list) and grab the alt value for our text input, and the column value for the label. This gives us an end effect of a list of editable values!

editable values.png

Importing to Hygraph

This tutorial will not cover creating a schema in Hygraph. We’ll assume you already have that experience, and if not, there’s lots of content available for just that topic! We’ll consider the normalized model from above.

goal data abstraction with hygraph

Our legacy data system we are importing from, the source of our CSV values, includes the legacy identifiers (IDs) which we’ll maintain for now to help us track relationships across systems.

When we model the course, we’ll persist the ID to an API-only value called “course_id” which will allow us to make those relationship connections at a later time.

create field API only.png

Generating Import Token

To track who is importing what into our system, we’ll create a specialized import token that we can revoke later if need be. Creating permanent auth tokens is not part of this tutorial, but you can read more about tokens here.

PAT CSV importer.png

Order of Import

An important step in importing content to any relational system is to consider your order of inputs. With Hygraph, it’s possible to import highly nested data structures where one could import a class, teacher, and college in one step. The reality is, this will depend a lot on the confidence level you have in the matching of your source content to your end form. Working with CSVs tends to be a much flatter data structure than one would typically use to import into a relational database as a nested import.

We’ll be importing single “sets” of data with our approach, starting with the least interdependent and working outwards to the most interdependent. This is where persisting our original identifiers will come in very useful.

Defining the Shape of the Mutation

We’ll use the Hygraph interface to design our import mutation. To begin, we’ll work with the College model, importing Name, State, Address, and college_id.

The sampling from our CSV in Retool shows the following original data source.

csv importer data set.png

As we go to define our mutation, however, we’ll notice a small problem - Hygraph doesn’t currently have a way to create or upsert many records at once – but there’s a trick! Like any trick, there’s a catch, and the catch is there’s a risk of creating duplicate content, but if we set the right fields with unique constraints, we can avoid that potential issue. We’ll use our legacy IDs as the unique data sources in our system.

The trick we’ll be employing is creating multiple entries for a related item. While our goal is to import multiple colleges, we’ll actually be creating an “import” teacher and creating multiple college associations for that teacher.

To handle the edge case where our teacher would be recreated and error, we will be using an upsert statement which will let us use the same teacher for the different pages of our import.

Our mutation looks like the following:

mutation ImportColleges($data: [CollegeCreateInput!]) {
upsertTeacher(where:{
email: "IMPORTER@IMPORTER.IMPORTER"
},
upsert: {
update: {
colleges: {
create: $data
}
},
create: {
firstName: "IMPORTER",
lastName: "IMPORTER",
email: "IMPORTER@IMPORTER.IMPORTER"
colleges: {
create: $data
}
}
}
) {
id
}
}

Our variables will be a payload in the shape of:

"data": [
{
"name": "",
"state": "",
"address": "",
"collegeId": ""
}
], …
}

We’ll test the mutation in the editor to see if it works as expected. Create some fake values for the variable payload and run the mutation. Set your environment to your importer token to be sure you are testing with the correct permission scope.

If it worked correctly, you’ll have created a new teacher and college. Let’s delete those as we move back to Retool.

Creating the Import Resource Query

In Retool, saved queries (SQL, GraphQL, etc) are defined as Resource queries. We can create those from the bottom panel of the main Retool editing application. We’ll choose “Resource query”, followed by selecting a GraphQL query. One of the reasons we’ve chosen Retool for this demo is the excellent first-party support for GraphQL.

resource query creation.png

Create a new import resource.png

If we provide our mutation from Hygraph, and the API endpoint, we’ll see that the editor auto-populates the variables needed for “data” – this is where we’ll do our transformation that maps the table, transforms with our key mapper utility, and ultimately provides the payload we tested within Hygraph.

You’ll want to provide your import auth token under the headers below.

headers import auth token.png

We’re almost there!

Paginating and Transforming

The table we are working with has sliced views of our total data set. Hygraph itself has a batch limit of 1000 operations. Our table, with its default limit of five rows, is comfortably within those limits. But the table slice view is customizable per the low-code mantra.

What we want to affect is the ability to grab the current slice of data from the table, transform the column names, according to our key remapper widget, and batch import those into Hygraph.

We’ll create one more component which helps us visualize the data we will be importing into Hygraph. We’ll add a JSON viewer below our table. This will let us view the transformed data. The last box is our JSON viewer. We can define the content that shows up in the inspector.

defining displayed content with CSV importer.png

Note that the count at our root of the JSON browser is ten, but our slice of data from the table is five.

This bit of code here in the {{recordBrowser.data}} is where we’ll run our transformation and pagination logic. This will be the most complex bit of code we need to write, but once this exists, this logic will work for all of the sheets we want to import, and this will work across APIs, too!

According to the docs, these execute as something known as an immediately invoked function expression, IIFE, which means, we can also write pure JavaScript in here!

Let’s look at our code dump section by section, skip to the last section to see the complete statement.

Here’s the complete view of our script, you can copy the code at the end of this explanation.

csv importer script.png

  • Lines 1 and 31 are the open and close of our IFFE block. Lines 2 through 30 are vanilla JavaScript.

  • Lines 3-6 grab the number of rows and the current page number of our table component.

  • Lines 8-9 use the pagination settings to slice the current data (a set of five records).

  • Lines 11-15 create a dictionary from our key mapper component. This is a useful tool for us to get a direct mapping between the old column name and the new column name.

  • Lines 17-27 transform our code, but we’ll break it down into smaller steps.

  • Line 18 loops through each row of the slice of data (five loops).

  • Line 19 grabs the keys (or column names) from the original object, then uses that list of names to create a new object (our reduce method) inserting a new key on the object using the name we set up in our dictionary.

  • Line 21 provides a filter that lets us skip any column we prepend with “__” - you can remove this logic, but it’s helpful to pull columns off the data if you don’t intend to import that content.

{{(()=>{

// The start of the current page in the table viewer

const pageStart = recordBrowser.paginationOffset

// The end of the current page in the table viewer

const pageEnd = recordBrowser.paginationOffset + recordBrowser.pageSize

// The current view of the table

const currentView = recordBrowser.data.slice(pageStart,pageEnd)

// Template for the shape of the new object


// Transform KeyMapper into a dictionary in shape of {oldKey1: newKey1, oldKey2: newKey2}

const dict = keyMapper.value.reduce((collect,curr) => {

collect[curr.column] = curr.alt

return collect

},{})


// Transform current Table view with new column names.

const payload = currentView.map((row) => {

return Object.keys(row).reduce((collection, current) => {

// Filter all keys prepended with __

if (dict[current].slice(0,2) !== "__") {

// Transform object with new column name.

collection[dict[current]] = row[current]

}

return collection

}, {})

})


return payload

})()}}

Tip: A better solution would be to use a CSV manipulation tool to delete columns you don’t intend to use and to control any large-scale data transforms before this step.
Ok, so that’s now exactly low-code, but that’s as complex as it gets! And this logic is reusable for all the other CSV’s we’d import.
Now we can view the transformed content in our JSON browser and navigate between the pages.
#### Importing the Content to Hygraph
With our data transformed, we need three last steps. Telling our mutation query which data to pass as the data variable, and providing a button to run the mutation.
Editing our resource query, we can simply tell the variable to grab our value from the JSON browser.
![variables_payload.value.png](https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/rsD4nzHR5aejzvEaDryk)
Note, I’ve named my JSON browser “payload”.
Lastly, we’ll create a button on the table component and tell it to execute the importColleges Query (you’ll need to change the query you are executing for each CSV you import, but only the mutation shape changes.
![importColleges Query.png](https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/XsIdMmSGTSS1EELk5Lal)
Run the import!
![hygraph content csv importer.png](https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/ygVuO627TaqeNtly85LE)
From here, you rinse and repeat for the remaining CSVs. The mutation will differ, but the process is the same!
## Recap
Each workflow will need to be heavily modified depending on the CSVs you have on hand. The tooling with Retool or other low-code utilities provides onboarding paths for non-technical staff to be able to run data cleaning, importing, and managing.
There are some gotchas to be aware of, including API rate limits, and for batch imports like this, working with some non-official workarounds like creating an “import relation”.
At the end of the day, the better approach lies somewhere in between. Let a developer resource create a serverless function or some other data handling mechanism that executes the manipulation and mappings on a server, and use tools like retool to build the back-end office with a minimal interface to the final transformation. Using the management API in conjunction with the content API creates a tight coupling between schema-driven development and the end need.
But for those that truly need batch importing of CSVs in a low-code context, and there are some use-cases where there is no other way around it, I hope this tutorial provided the tooling you needed to empower you in handling your content import needs.
Thanks for reading!

Blog Author

Jesse Martin

Jesse Martin

Share with others

Sign up for our newsletter!

Be the first to know about releases and industry news and insights.