This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CHECK ishassan/build.sbt as well | |
import org.apache.hadoop.hbase.client._ | |
import org.apache.hadoop.hbase.util.Bytes | |
import org.apache.hadoop.hbase.{CellUtil, HBaseConfiguration, TableName} | |
import org.apache.hadoop.conf.Configuration | |
import scala.collection.JavaConverters._ | |
object ScalaHBaseExample extends App{ | |
def printRow(result : Result) = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# version 1.2 - 2022-10-04 | |
import pandas as pd | |
import sqlalchemy as sa | |
def df_upsert(data_frame, table_name, engine, schema=None, match_columns=None): | |
""" | |
Perform an "upsert" on a PostgreSQL table from a DataFrame. | |
Constructs an INSERT … ON CONFLICT statement, uploads the DataFrame to a |