Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dataform/core

Package Overview
Dependencies
Maintainers
3
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dataform/core

Dataform core API.

  • 3.0.2
  • npm
  • Socket score

Version published
Weekly downloads
13M
decreased by-20.94%
Maintainers
3
Weekly downloads
 
Created

What is @dataform/core?

@dataform/core is a powerful tool for managing data workflows and transformations. It allows you to define data models, schedule data transformations, and manage dependencies between different data operations. It is particularly useful for teams working with large-scale data warehouses and ETL processes.

What are @dataform/core's main functionalities?

Defining Data Models

This feature allows you to define data models using SQL queries. The `table` function is used to create a new table, specifying its type, dependencies, and the SQL query that defines its content.

const dataform = require('@dataform/core');
const { table, ref } = dataform;

table('my_table', {
  type: 'table',
  dependencies: [ref('source_table')],
  query: `
    SELECT *
    FROM ${ref('source_table')}
  `
});

Scheduling Data Transformations

This feature allows you to schedule data transformations using cron syntax. The `schedule` function is used to define a scheduled task, specifying the cron schedule and the actions to be performed.

const dataform = require('@dataform/core');
const { schedule } = dataform;

schedule('daily_update', {
  cron: '0 0 * * *',
  actions: [
    { name: 'update_table', type: 'operation', query: 'CALL update_table_procedure();' }
  ]
});

Managing Dependencies

This feature allows you to manage dependencies between different data operations. The `ref` function is used to reference other tables or operations, ensuring that dependencies are correctly managed.

const dataform = require('@dataform/core');
const { ref, table } = dataform;

table('dependent_table', {
  type: 'table',
  dependencies: [ref('base_table')],
  query: `
    SELECT *
    FROM ${ref('base_table')}
  `
});

Other packages similar to @dataform/core

Keywords

FAQs

Package last updated on 08 Aug 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc