Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hacktoberfest] Job functionality #97

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

HahaBill
Copy link

@HahaBill HahaBill commented Oct 24, 2024

Job functionality

Developers can now:

  1. Create a job (issue [Hacktoberfest] A function to create a job #84)
  2. Delete a job (issue [Hacktoberfest] A function to remove a job #85)

Examples

1. Create a job

  const jobName = '<YOUR JOB NAME>';
  const project = '<YOUR PROJECT NAME>';
  const job = MindsDB.Jobs.createJob(jobName, project);

  job.addQuery('INSERT INTO integration_name.table_name(SELECT * from integration_name_two.table_name_two)');
  job.setEvery('1 MINUTE')
  await job.create();
Screen.20Recording.202024-10-24.20at.2023.mp4

2. Delete a job

  const jobName = 'test_deleting_job';
  const project = 'hahabill';
  const job = MindsDB.Jobs.create(jobName, project);

  job.addQuery('INSERT INTO clickhouse_conn.mindsdb_create_job (SELECT * from clickhouse_conn.minds_insert_via_job)');
  job.setEvery('1 MINUTE')
  await job.createJob();

  await MindsDB.Jobs.dropJob(jobName, project);
Screen.20Recording.202024-10-30.20at.200.mp4

@mindsdb-devops
Copy link

mindsdb-devops commented Oct 30, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@HahaBill HahaBill changed the title [Hacktoberfest] Create a job functionality [Hacktoberfest] Job functionality Oct 30, 2024
@HahaBill
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@HahaBill
Copy link
Author

recheck

mindsdb-devops added a commit that referenced this pull request Oct 30, 2024
@HahaBill
Copy link
Author

I will explain the implementation more in detail and add sorts of documentation soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants