LogoLogo
ProductsPricingGlossary Launch Acho
  • 🎉Welcome
  • Introduction
  • What is Acho?
  • How does Acho work?
    • Proof of Concept (PoC)
  • App Builder
    • Get Started
    • Core Concepts
    • Overview
    • App construction
      • App Configuration
      • Pages
      • Interactions
        • Add an interaction
        • Add conditions to interactions
        • Event payload
        • Ordering interactions with action flow
        • Transformer
        • Actions
          • Navigation
          • Element
          • Data Source
          • App
          • Page
          • API Service
          • Database
          • Media Service
      • Table
      • Metric
      • Query
      • Data Store
      • Elements
        • Table & Chart
          • Searchable Table
          • Table
          • Chart
          • Score Card
        • Form Elements
          • Form
          • Search Bar
          • Checkbox
          • Date Picker
          • Custom Form
          • Input
          • Multiselect
          • Radio Button
          • Radio List
          • Rich Text Editor
          • Select
          • Switch
          • Textarea
          • Upload
        • Web Elements
          • Badge
          • Button
          • Clickable
          • Collapse Menu
          • Divider
          • Icon
          • Image
          • Link
          • Message
          • Modal
          • Notification
          • Pagination
          • Popover
          • Rate
          • Rich Text
          • Tabs
          • Text
        • Layout Elements
          • Container
          • List
        • Advanced elements
          • Code Block
          • Condition
          • Print
        • CSS Styles
          • General techniques
          • Layout
          • Spacing
          • Size
          • Position
          • Typography
          • Background
          • Border
          • Effect
        • Form Check
        • Tooltip
      • Accessors
      • Plugin Store
    • Popular Use Cases
      • Build a chart from Table Nodes
      • Create a table
      • Create a list
      • Create a filter
      • Create a search bar
      • Use Custom Form Container to collect user inputs
      • Drill down on a table
      • Download file from query node
      • Set loading animations
      • Modify a database
      • Navigate to a different page
      • Set up dynamic routing
      • Update app data using accessors
      • Create a Chart with Code Block and D3 Library
      • Rich text and rich text editor
      • Send an Email via Mailjet Plugin
    • Preview
    • Publish
      • Embed published app on website
    • Version Control
    • App User Management
      • Onboarding Page
      • Sign in page
      • Guest Isolation and Private Session
    • Theme
    • FAQ
  • Acho Studio
    • Quick Start
    • Resources
      • Add a resource
      • Supported data sources
        • Airtable
        • Amazon Ads
        • Amplitude
        • Amazon Seller Partner
        • Apify Dataset
        • Appstore
        • Asana
        • API Connector
        • API Template
        • AWS CloudTrail
        • Azure Table Storage
        • Batch Files
        • Bamboo HR
        • BigCommerce
        • BigQuery
        • Bing Ads
        • Braintree
        • Cart.com
        • Chargebee
        • Chargify
        • Chartmogul
        • Clickhouse
        • Close.com
        • CockroachDB
        • Confluence
        • Customer.io
        • Delighted
        • Dixa
        • Drift
        • Facebook Marketing
        • Freshdesk
        • Freshsales
        • Freshservice
        • GitHub
        • GitLab
        • Google Ads
        • Google Analytics
        • Google Sheets
        • Google Search Console
        • Greenhouse
        • Harness
        • Harvest
        • HubSpot
        • IBM Db2
        • Instagram
        • Intercom
        • Iterable
        • Jenkins
        • Jira
        • Kafka
        • Klaviyo
        • Kustomer
        • Lemlist
        • Lever Hiring
        • LinkedIn Ads
        • Linnworks
        • Mailchimp
        • Marketo
        • Microsoft Teams
        • Mixpanel
        • Monday
        • MongoDB
        • MySQL
        • My Hours
        • NetSuite
        • Notion
        • Okta
        • OneDrive
        • OneSignal
        • Oracle DB
        • Outreach
        • PagerDuty
        • Paypal Transaction
        • Paystack
        • Pipedrive
        • PersistIq
        • Pinterest
        • Plaid
        • PostgreSQL
        • PostHog
        • PrestaShop
        • Qualaroo
        • QuickBooks
        • Recharge
        • Recurly
        • Remote File
        • S3
        • Salesforce
        • Salesloft
        • SearchMetrics
        • Sendgrid
        • Sentry
        • Short.io
        • Shopify
        • Single File
        • Slack
        • Smartsheets
        • Snapchat Marketing
        • Snowflake
        • SQL Server
        • Square
        • Stripe
        • SurveyMonkey
        • Tempo
        • TikTok Marketing
        • Trello
        • Twilio
        • Typeform
        • VictorOps
        • WooCommerce
        • YouTube Analytics
        • Zendesk Chat
        • Zendesk Sunshine
        • Zendesk Talk
        • Zendesk Support
        • Zenloop
        • Zoho CRM
        • Zoom
        • Zuora
    • Data Prep (Projects)
      • Create a Data Prep Project
        • Create a table tab
        • Copy a table tab
        • Hide a table tab
      • Apply an action
        • View
          • Hide Columns
          • Filter
          • Sort
          • Cut
          • Rename
          • Move Column
        • Combine Tables
          • Join
          • Union
        • Transformation
          • Pivot Table
          • Unpivot
        • Data Cleaning
          • Cleanse
          • Replace
          • Change Type
          • Deduplicate
          • Split
          • Flatten
        • Tools
          • Formula
          • SQL Editor
            • SQL Editor Queries
            • All functions in Formula/SQL
              • Mathematical Functions
              • String Functions
              • Date Functions
              • Datetime Functions
              • Time Functions
              • Timestamp Functions
              • Conditional Functions
              • Type Conversion
              • Other Functions
        • Reserved Keywords
      • Pipeline
      • Edit your pipelines
      • Generate column summary for inspection
      • Use URL to access and share your project
      • Write a description for your project
      • Delete a resources/project/tab
    • Data Flow
      • Export data
        • Download CSV files
        • Excel Connector
        • Google Sheets Connector
        • Embed a table on your website
          • Data Usage Agreement
        • Apache Superset
        • Chartio
        • Looker
        • Metabase
        • Power BI
        • Qlik
        • Tableau
        • MongoDB
        • MySQL
        • MSSQL
        • Snowflake
        • PostgreSQL
        • BigQuery
    • Set up Data Sync
    • FAQ
  • Organization
    • Get started
    • Create an organization
    • Invite people to your organization
    • Share your resources
    • Share your projects
    • Share your apps
    • Change payment method on file
  • FAQ
    • I can't find data after uploading a big CSV file
Powered by GitBook
On this page
  • Load CSV To Postgres
  • Load JSON To Postgres
  • Example: Upload CSV to Postgres

Was this helpful?

  1. App Builder
  2. App construction
  3. Interactions
  4. Actions

Database

Load CSV To Postgres

Load a CSV file into a PostgreSQL database. It could be combined with an Upload element, allowing end-users to upload CSV files directly into a specified table in a PostgreSQL database.

Parameters:

  • Asset ID Select: Choose the target PostgreSQL database. This selection determines where the CSV data will be loaded.

  • Table Name: Specify the name of the table in the PostgreSQL database where the CSV data will be loaded.

  • File Path: Provide the path to the CSV file you wish to upload.

  • Create Table If Absent: Activate this option to allow the system to automatically create a new table in the PostgreSQL database if the specified table name does not already exist. This feature helps in situations where the target table is yet to be set up.

  • Safe Mode: Enabling Safe Mode treats all columns in the CSV as text data. This mode is useful for preventing data type mismatches and errors during the upload process, especially when the exact data types of the CSV columns are unknown or varied.

  • Schema Detection Sample: This feature automatically detects and aligns the schema of the CSV file with the corresponding table in the PostgreSQL database. By default, the schema detection samples the first 1000 rows of the CSV file. This aids in accurately mapping CSV columns to the database table columns, reducing the risk of data inconsistencies.

Load JSON To Postgres

Load a JSON file into a PostgreSQL database. It could be combined with an Upload element, allowing end-users to upload JSON files directly into a specified table in a PostgreSQL database.

Parameters:

  • Asset ID Select: Choose the target PostgreSQL database.

  • Table Name: Specify the name of the table in the PostgreSQL database where the JSON data will be loaded.

  • File Path: Provide the path to the JSON file you wish to upload.

  • Create Table If Absent: Activate this option to allow the system to automatically create a new table in the PostgreSQL database if the specified table name does not already exist. This feature helps in situations where the target table is yet to be set up.

  • Safe Mode: Enabling Safe Mode treats all columns as text data. This mode is useful for preventing data type mismatches and errors during the upload process.

  • Schema Detection Sample: This feature automatically detects and aligns the schema of the CSV file with the corresponding table in the PostgreSQL database. By default, the schema detection samples the first 1000 records of the JSON file.

Example: Upload CSV to Postgres

Combining Upload and the Load CSV To Postgres API, you can build service for users to upload csv and preview them. This example serves as one of our template Upload CSV template, which you can find in the app builder.

  1. Add An Upload element

  2. Select event Upload Successfully

  3. (Optional) Use Generate Unique ID to get a table name and save it in app data

  4. Add the "Load CSV To Postgres" action. Use the path of the first uploaded file as the Path parameter.

  5. (Optional) Add a "Set Text" action to display a message indicating whether the operation was successful.

PreviousAPI ServiceNextMedia Service

Last updated 1 year ago

Was this helpful?

Load CSV to Postgres in action flow