Skip to content

Commit

Permalink
Merge pull request #4 from AcalaNetwork/polish-data-porter-logs
Browse files Browse the repository at this point in the history
polish data porter
  • Loading branch information
shunjizhan authored Feb 8, 2024
2 parents d14b10a + 9462a30 commit 77d913e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data-porter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "acala-data-porter",
"version": "0.0.2",
"version": "0.0.3",
"main": "src/index.ts",
"license": "MIT",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions data-porter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const env = cleanEnv(process.env, {
PASSWORD_DEV: str(),
API_KEY: str(),
DB_SCHEMA: str(),
DUNE_TABLE_NAME: str(),
});

const main = async () => {
Expand All @@ -27,14 +28,14 @@ const main = async () => {
password: env.PASSWORD_DEV,
});

console.log('data fetching finished!');
console.log(`data fetching finished! ${rawData.length} rows fetched`);

const data = transformCSV(rawData);

await uploadToDune({
data,
apiKey: env.API_KEY,
tableName: 'euphrates_stake',
tableName: env.DUNE_TABLE_NAME,
description: 'euphrates_stake',
});
};
Expand Down

0 comments on commit 77d913e

Please sign in to comment.