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

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

HahaBill
Copy link
Contributor

@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
Contributor Author

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

@HahaBill
Copy link
Contributor Author

recheck

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

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

@chandrevdw31
Copy link

@HahaBill can you merge main branch in the pr please.

@HahaBill
Copy link
Contributor Author

HahaBill commented Nov 6, 2024

@HahaBill can you merge main branch in the pr please.

@chandrevdw31 Hi, I've just merged the main branch in the pr. Let me know what I need to do more!

@setohe0909 setohe0909 merged commit fc7af53 into mindsdb:main Nov 6, 2024
1 check passed
@mindsdb mindsdb locked and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants