Create MotherDuck Account
MotherDuck has a new API to create accounts.
This API accepts a http reqest using the POST method.
Example request:
Copy code
POST / HTTP/2
Host: new.motherduck.com
User-Agent: curl/8.7.1
Accept: */*
It returns a JSON response which includes a motherduck_token and how_to_use_motherduck, which is instructions on how to use MotherDuck.
Example response:
Copy code
{
"claim_org_url" : "https://app.motherduck.com/claim-org?inviteId=xxx-xxxx-xxx-xxxx-xxxx",
"how_to_use_motherduck" : "\nMotherDuck is a datawarehouse for your data. You can store, share, analyse your data, create dashboards with the 'dive' feature, and create workflows like ingest + schedule jobs using the 'flight' feature.\n\nTo use MotherDuck you need to install the duckdb cli using following command: `curl https://install.duckdb.org | sh`\nConnect to MotherDuck using the MotherDuck token you received: `motherduck_token=<motherduck-token-here> duckdb \"md:\" `\n\nThis will connect you to MotherDuck and default to using my_db. Create as many new databases as you want, follow it by `USE <database_name>`.\n\nCreate tables in this database for your data\n- from csv using: CREATE TABLE <table_name> AS SELECT * FROM '<filename>.csv';\n- from parquet using: CREATE TABLE <table_name> AS SELECT * FROM '<filename>.parquet';\n\nTo know more about:\n- Writing SQL to access MotherDuck, browse duckdb documentation here https://duckdb.org/docs/\n- All the cloud functions of MotherDuck use https://motherduck.com/docs\n- Creating dives browse: https://motherduck.com/docs/sql-reference/motherduck-sql-reference/ai-functions/dives/\n\nTo own the organization created here, simply paste the claim_org_url in the browser and sign up with your email address to claim it.\n",
"motherduck_token" : "eyJhbGci...5Ukxg",
"region" : "aws-us-east-1"
}
Next you can connect to MotherDuck with the DuckDB CLI with the given token.