Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
vega-transform-db
Advanced tools
Data transform to load data from a database in Vega.
This package extends Vega's set of data transforms to support loading data from a database in Vega version 5.0 and higher.
Install the transform with
yarn add vega-transform-db
To use the transform, you must initially set the type
. We currently aim to support 2 types of interaction with a database either via a middleware server or directly through a query function.
So if you intend to use a server set the type to Server
or Serverless
if you're passing a query function, then register the transform as dbtransform
.
import VegaTransformDB from "vega-transform-db"
VegaTransformDB.type('Serverless');
transforms["dbtransform"] = VegaTransformDB;
Further examples for using the package with a middleware server and with a serverless query function.
# VegaTransformDB.type(type: string = "Serverless")
VegaTransformDB.type('Server')
or not VegaTransformDB.type('Serverless')
# VegaTransformDB.QueryFunction(function)
Serverless
, this function is used to indicate which query function is to be used when a sql query is encountered.# VegaTransformDB.setHttpOptions(object)
Server
, this function is used to set the Http POST request options, i.e,const httpOptions = {
'url': 'http://localhost:3000/query',
'mode': 'cors',
'method': 'POST',
'headers': {
'Content-Type': 'application/x-www-form-urlencoded'
}
};
VegaTransformDB.type('Server');
vega.transforms["dbtransform"] = VegaTransformDB;
VegaTransformDB.setHttpOptions(httpOptions);
This example indicates that when a query is to be executed it will send a POST request at http://localhost:3000/query with sql query.
FAQs
Vega transform for databases
We found that vega-transform-db demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.