Demo
blackline.execution.demo
INIT_ORGANIZATION = '# See details docs at https://docs.getblackline.com/\norganization:\n - key: organization_demo\n'
module-attribute
INIT_RESOURCE = '# See details docs at https://docs.getblackline.com/\nresource:\n - key: resource_demo\n resource_type: Service\n privacy_declarations:\n - name: Analyze customer behaviour for improvements.\n data_categories:\n - user.contact\n - user.device.cookie_id\n data_use: improve.system\n data_subjects:\n - customer\n data_qualifier: identified_data\n'
module-attribute
INIT_SYSTEM = '# See details docs at https://docs.getblackline.com/\nsystem:\n - key: system_demo\n'
module-attribute
Demo
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
|
init_project = InitProject(path=path, name=name, overwrite=overwrite, default_profile=default_profile, init_organization=INIT_ORGANIZATION, init_system=INIT_SYSTEM, init_resource=INIT_RESOURCE, init_dataset=demo_dataset(), init_adapter=demo_adapter(project_root=self.path, profile=default_profile))
instance-attribute
name = name
instance-attribute
overwrite = overwrite
instance-attribute
path = path
instance-attribute
project_config = self.init_project.project_config
instance-attribute
__init__(path, name=SAMPLE_PROJECT_NAME, overwrite=False, default_profile=DEFAULT_PROFILE)
Initializes the Demo class instance with the given parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
Path to the directory where the project will be created. |
required |
name |
str
|
Name of the project. |
SAMPLE_PROJECT_NAME
|
overwrite |
bool
|
If set to True, overwrites the existing project. |
False
|
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
connection()
Establishes a connection with the database.
Returns:
Name | Type | Description |
---|---|---|
Connection |
Connection
|
A connection object. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
create()
Creates a project and a database for the demo instance.
create_database()
Creates user and shipment tables in the database.
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
create_shipment_table(conn, shipments)
staticmethod
Creates a shipment table in the database and inserts data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conn |
Connection
|
A connection object. |
required |
shipments |
list[list[object]]
|
A list of shipment data. |
required |
Returns:
Type | Description |
---|---|
None
|
None |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
create_user_table(conn, users)
staticmethod
Creates a user table in the database and inserts data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conn |
Connection
|
A connection object. |
required |
users |
list[list[object]]
|
A list of user data. |
required |
Returns:
Type | Description |
---|---|
None
|
None |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
create_demo(path, name=SAMPLE_PROJECT_NAME, overwrite=False, default_profile=DEFAULT_PROFILE)
Creates an instance of Demo and runs the create() method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
Path to the directory where the project will be created. |
required |
name |
str
|
Name of the project. |
SAMPLE_PROJECT_NAME
|
overwrite |
bool
|
If set to True, overwrites the existing project. |
False
|
Returns:
Name | Type | Description |
---|---|---|
Demo |
Demo
|
A Demo class instance. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
demo_adapter(project_root, profile=DEFAULT_PROFILE)
Generates a demo adapter for the specified project root.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_root |
Path
|
The root path of the project. |
required |
Returns:
Type | Description |
---|---|
str
|
The demo adapter in yaml format. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
demo_dataset()
Generates a demo dataset.
Returns:
Type | Description |
---|---|
str
|
The demo dataset in yaml format. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
load_shipments()
Returns a list of lists containing information about shipments.
Returns:
Type | Description |
---|---|
list[list[object]]
|
List[List[object]]: A list of lists. Each inner list contains the following fields: # noqa: E501 |
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/execution/demo.py
load_users()
Returns a list of lists containing information about users.
Returns:
Type | Description |
---|---|
list[list[object]]
|
List[List[object]]: A list of lists. Each inner list contains the following fields: # noqa: E501 |
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|
list[list[object]]
|
|