Faraday Blog

SQL

Articles related to SQL from the team that helps B2C companies build and defend revenue with AI.

How to read CREATE TABLE SQL with pg_query

How to read CREATE TABLE SQL with pg_query

pg_query is a really cool Ruby library that uses Postgres's query parser to give you programmatic access to SQL queries. One thing you can do with it is read a CREATE TABLE statement to map column names to column types: sql = <<-SQL CREATE TABLE example ( my_text

Engineering hacks Nov 11, 2017 | Seamus Abshere
How to use Postgres cursors and multi-insert in Ruby with Sequel

How to use Postgres cursors and multi-insert in Ruby with Sequel

This post is part of our PostgreSQL series. SQL cursors are a great way to stream data out of a database without loading it all into memory. Reading using a cursor Sequel has use_cursor: BATCH_SIZE = 1000 DB[:widgets]. select(:id, :name, :power). use_cursor(rows_per_fetch: BATCH_

Engineering hacks Oct 25, 2016 | Seamus Abshere
Page 1 of 1

Faraday

Solutions
  • Customer Insights Understand your customers
  • Customer Acquisition Acquire the right customers
  • Customer Engagement Expand your customer LTV
  • Personalization at Scale Personalize every experience
  • Location Intelligence Uncover lucrative locations
Customers
  • Direct-to-consumer Brand innovators
  • Financial services Banks, CUs, fintechs
  • Home services Energy, security, & more
  • Mobility Automotive & future tech
Platform
  • Overview End-to-end AI
  • Reach Predictive targeting
  • Inform Real-time scoring
  • Monitor Customer scoring
  • Optimize Automated AI pipeline
  • Integrations & API 260+ connected services
  • Privacy policy
Company
  • Overview Who we are
  • Resources Case studies and more
  • Partners Become a partner
  • Privacy What we believe in
  • Our focus Committed to B2C
  • Careers Join the team
  • Contact How to get in touch
  • Do Not Sell My Info