Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Latest commit

 

History

History
35 lines (22 loc) · 1.08 KB

Step3.md

File metadata and controls

35 lines (22 loc) · 1.08 KB

Step 3 - Converting and Ingesting using a plugin.

To ingest the SQL sample, first export your admin key path using below command:

export GOOGLE_APPLICATION_CREDENTIALS=/home/stingray/<your admin key>.json

The demo file is in the demo directory called fake.sql. I have created a plugin to parse this data, so you can use the plugin using below syntax:

./frack.py parse -m fake -i demo/fake.sql -u

Argument Meaning
parse The first parameter is the module to use. We will be using the parse module.
-m Use a plugin to parse the file
-u After parsing and conversion, upload the file to our storage bucket.
-i The input file name.

And you should get an output similar to below:

Image12

Now to ingest the file into the database, run below:

./frack.py db -n

Argument Meaning
db We will be using the db module since we’re talking to the db.
-n Trigger the ingestion and import the files into your new database.

The file will be ingested. Note that it may take a while if you ingest massive data sets.

Image09