Skip to content

Commit

Permalink
Add layer to sdk docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lcard committed Sep 12, 2023
1 parent dc9d6f2 commit 1babc18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/sdk/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ raw_data = [{"a": 1, "b": 2, "c": 3}, {"a": 10, "b": 20, "c": 30}]
df = pd.DataFrame(raw_data)

schema = rapid.generate_schema(
df=df, domain="domain", dataset="dataset", sensitivity="PUBLIC"
df=df, layer="layer", domain="domain", dataset="dataset", sensitivity="PUBLIC"
)

print("Domain ", schema.metadata.domain)
Expand All @@ -61,7 +61,9 @@ The sdk provides an easy way to automatically download a specific dataset based
import pandas as pd
from rapid import Rapid

data = rapid.download_dataframe(domain="domain", dataset="dataset", version=1)
data = rapid.download_dataframe(
layer="layer", domain="domain", dataset="dataset", version=1
)

print(data.info())
```
Expand All @@ -78,7 +80,7 @@ query = Query(
)

data = rapid.download_dataframe(
domain="domain", dataset="dataset", version=1, query=query
layer="layer", domain="domain", dataset="dataset", version=1, query=query
)

print(data.info())
Expand Down
2 changes: 2 additions & 0 deletions docs/sdk/useful_patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ raw_data = [{"a": 1, "b": 2, "c": 3}, {"a": 10, "b": 20, "c": 30}]
df = pd.DataFrame(raw_data)

metadata = SchemaMetadata(
layer="default",
domain="mydomain",
dataset="mydataset",
owners=[Owner(name="myname", email="myemail@email.com")],
Expand Down Expand Up @@ -48,6 +49,7 @@ raw_data = [{"a": 1, "b": 2, "c": 3}, {"a": 10, "b": 20, "c": 30}]
df = pd.DataFrame(raw_data)

metadata = SchemaMetadata(
layer="default",
domain="mydomain",
dataset="mydataset",
owners=[Owner(name="myname", email="myemail@email.com")],
Expand Down

0 comments on commit 1babc18

Please sign in to comment.