Registry / database / juttle-mysql-adapter

juttle-mysql-adapter

JSON →
library0.6.1jsnpmunverified

A Juttle adapter for MySQL that provides read and write support for querying MySQL databases using the Juttle data flow language. Version 0.6.1 is the latest release, with no recent updates (repository archived). It allows SQL table reads with filtering, raw queries, and time-based pagination via a timeField option. Built on knex.js for SQL generation. Similar adapters exist for other databases (e.g., juttle-mongo-adapter), but this is specifically for MySQL. Note: Juttle itself is no longer actively maintained, making this adapter deprecated.

npm install juttle-mysql-adapter
INSTALL
IMPORT
SIG · JUTTLE-MYSQL-ADAPT
J
juttle-mysql-adapter
databasejavascriptv0.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

adapter
const adapter = require('juttle-mysql-adapter');
import adapter from 'juttle-mysql-adapter';
CommonJS module; no default ES import available.
config
// Add to Juttle config under adapters.mysql
const config = require('juttle-mysql-adapter/config');
Configuration is done via Juttle's config file, not by requiring submodules.
read/write
// Used within Juttle programs as read mysql ... / write mysql ...
const read = require('juttle-mysql-adapter').read;
Adapter functions are invoked via Juttle runtime, not directly imported.

Installs Juttle and the MySQL adapter, configures credentials, and reads 100 rows from a 'logs' table.

// Install Juttle and adapter // npm install juttle juttle-mysql-adapter // ~/.juttle/config.json { "adapters": { "mysql": { "user": "root", "password": "password", "host": "localhost", "db": "test" } } } // Juttle program: read from table 'logs' with limit 100 read mysql -table 'logs' -fetchSize 100
Debug
Known issues
deprecatedJuttle project is no longer maintained; this adapter is deprecated.
fix
Migrate to alternative data flow tools (e.g., Apache Beam, Node.js with mysql2).
affects: >=0.0.0
gotchaThe 'read mysql' command defaults to a limit of 10000 rows; use -fetchSize to override.
fix
Explicitly set -fetchSize to desired value.
affects: >=0.0.0
gotchaTime-based filtering requires a -timeField option; without it, -from and -to are ignored.
fix
Always specify -timeField when using -from/-to.
affects: >=0.0.0
gotchaRaw SQL queries with -raw bypass adapter safety checks; risk of SQL injection.
fix
Use parameterized queries via -table option instead.
affects: >=0.0.0
breakingAdapter requires knex 0.x; incompatible with knex 1.x or higher.
fix
Pin knex version to 0.x in package.json.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'juttle-mysql-adapter'
Adapter not installed or not in node_modules path.
fix
Run 'npm install juttle-mysql-adapter' in the same directory as your Juttle program.
Error: connect ECONNREFUSED 127.0.0.1:3306
MySQL server not running or incorrect host/port.
fix
Start MySQL service and verify host/port in config.
Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost'
Incorrect username or password in config.
fix
Update 'user' and 'password' in ~/.juttle/config.json.
Error: ER_NO_SUCH_TABLE: Table 'test.logs' doesn't exist
Specified table does not exist in the database.
fix
Verify table name and database name in config and query.
Upgrade
Version history
0.6.1latest on npm
Audit
Dependencies
juttlerequiredRequired runtime dependency; the adapter runs within Juttle.
knexrequiredUsed internally for SQL query building and connection.
mysqlrequiredMySQL driver needed by knex.
Agent activity
7 hits · last 30 days
node
6
Resources
juttle-mysql-adapter — npm install juttle-mysql-adapter · libregistry