Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions solarcar-map/data-load/data-load.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Title of the Lab

## Introduction

*Describe the lab in one or two sentences, for example:* This lab walks you through the steps to ...

Estimated Time: -- minutes

### About <Product/Technology> (Optional)
Enter background information here about the technology/feature or product used in this lab - no need to repeat what you covered in the introduction. Keep this section fairly concise. If you find yourself needing more than two sections/paragraphs, please utilize the "Learn More" section.

### Objectives

*List objectives for this lab using the format below*

In this lab, you will:
* Objective 1
* Objective 2
* Objective 3

### Prerequisites (Optional)

*List the prerequisites for this lab using the format below. Fill in whatever knowledge, accounts, etc. is needed to complete the lab. Do NOT list each previous lab as a prerequisite.*

This lab assumes you have:
* An Oracle Cloud account
* All previous labs successfully completed


*Below, is the "fold"--where items are collapsed by default.*

## Task 1: Concise Task Description

(optional) Task 1 opening paragraph.

1. Step 1

![Image alt text](images/sample1.png)

To create a link to local file you want the reader to download, use the following formats. _The filename must be in lowercase letters and CANNOT include any spaces._

Download the [starter file](files/starter-file.sql) SQL code.

When the file type is recognized by the browser, it will attempt to render it. So you can use the following format to force the download dialog box.

Download the [sample JSON code](files/sample.json?download=1).

> Note: do not include zip files, CSV, PDF, PSD, JAR, WAR, EAR, bin, or exe files - you must have those objects stored somewhere else. We highly recommend using Oracle Cloud Object Store and creating a PAR URL instead. See [Using Pre-Authenticated Requests](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm)

2. Step 2

![Image alt text](images/sample1.png)

4. Example with inline navigation icon ![Image alt text](images/sample2.png) click **Navigation**.

5. Example with bold **text**.

If you add another paragraph, add 3 spaces before the line.

## Task 2: Concise Task Description

1. Step 1 - tables sample

Use tables sparingly:

| Column 1 | Column 2 | Column 3 |
| --- | --- | --- |
| 1 | Some text or a link | More text |
| 2 |Some text or a link | More text |
| 3 | Some text or a link | More text |

2. You can also include bulleted lists - make sure to indent 4 spaces:

- List item 1
- List item 2

3. Code examples

```
Adding code examples
Indentation is important for the code example to appear inside the step
Multiple lines of code
<copy>Enclose the text you want to copy in <copy></copy>.</copy>
```

4. Code examples that include variables

```
<copy>ssh -i <ssh-key-file></copy>
```

## Learn More

*(optional - include links to docs, white papers, blogs, etc)*

* [URL text 1](http://docs.oracle.com)
* [URL text 2](http://docs.oracle.com)

## Acknowledgements
* **Author** - <Name, Title, Group>
* **Contributors** - <Name, Group> -- optional
* **Last Updated By/Date** - <Name, Month Year>
38 changes: 38 additions & 0 deletions solarcar-map/data-load/files/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"quiz": {
"sport": {
"q1": {
"question": "Which one is correct team name in NBA?",
"options": [
"New York Bulls",
"Los Angeles Kings",
"Golden State Warriros",
"Huston Rocket"
],
"answer": "Huston Rocket"
}
},
"maths": {
"q1": {
"question": "5 + 7 = ?",
"options": [
"10",
"11",
"12",
"13"
],
"answer": "12"
},
"q2": {
"question": "12 - 8 = ?",
"options": [
"1",
"2",
"3",
"4"
],
"answer": "4"
}
}
}
}
101 changes: 101 additions & 0 deletions solarcar-map/data-load/files/starter-file.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/* NOTE: Files cannot contain empty lines (line breaks) */
/* Specify the base URL that you copied from your files in OCI Object Storage in the define base_URL line below*/
/* change idthydc0kinr to your real namespace. The name is case-sensitive. */
/* change ADWCLab to your real bucket name. The name is case-sensitive. */
/* change us-phoenix-1 to your real region name. The name is case-sensitive. */
/* you can find these values on the OCI Console .. Storage .. Object Storage screen */
set define on
define base_URL='https://objectstorage.us-phoenix-1.oraclecloud.com/n/idthydc0kinr/b/ADWCLab/o'
/* copy Channels table */
begin
dbms_cloud.copy_data(
table_name =>'CHANNELS',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/chan_v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true')
);
end;
/
/* copy Countries table */
begin
dbms_cloud.copy_data(
table_name =>'COUNTRIES',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/coun_v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true')
);
end;
/
/* Copy customers */
begin
dbms_cloud.copy_data(
table_name =>'CUSTOMERS',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/cust1v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS')
);
end;
/
begin
dbms_cloud.copy_data(
table_name =>'SUPPLEMENTARY_DEMOGRAPHICS',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/dem1v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true')
);
end;
/
begin
dbms_cloud.copy_data(
table_name =>'SALES',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/dmsal_v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD')
);
end;
/
begin
dbms_cloud.copy_data(
table_name =>'PRODUCTS',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/prod1v3.dat',
format => json_object('delimiter' value '|', 'quote' value '^', 'ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true')
);
end;
/
begin
dbms_cloud.copy_data(
table_name =>'PROMOTIONS',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/prom1v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true')
);
end;
/
begin
dbms_cloud.copy_data(
table_name =>'SALES',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/sale1v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true')
);
end;
/
begin
dbms_cloud.copy_data(
table_name =>'TIMES',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/time_v3.dat',
format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true')
);
end;
/
begin
dbms_cloud.copy_data(
table_name =>'COSTS',
credential_name =>'OBJ_STORE_CRED',
file_uri_list =>'&base_URL/costs.dat',
format => json_object('ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true')
);
end;
/
Binary file added solarcar-map/data-load/images/sample1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added solarcar-map/data-load/images/sample2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions solarcar-map/howtouse-deletewhenfinished.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Workshop with a single set of labs

## Instructions - Delete this file when finished

1. Open the sample-workshop template in Atom or Visual Studio Code
2. We pre-created 5 folders. A workshop is created out of multiple labs.
3. Remove the comments like this one: *List objectives for this lab*
4. Make sure you use lower case folder and file name and dashes for spaces (setup-adb NOT Setup_ADB)
5. Your image names should have descriptive names. Not just adb1, adb2, adb3. For handicap accessibility, we need the image descriptions to explain what the image looks like. Remember all lowercase and dashes.
6. Download our QA doc from WMS. We find workshops get in production quicker when you know what's needed to move to production up front and you use the skeleton.

PS: You do not need a Readme.md. Readme's exist only at the top library levels. We direct all traffic to LiveLabs since we can't track usage on GitHub. Do not create any direct links to GitHub, your workshop may be super popular but we can't track it so no one will know.

## Absolute Path for Oracle Cloud menu Navigation

**Lab 1: Provision an Instance -> Step 0: Use these Standardized Pictures for Oracle Cloud Navigation (Commonly for Provisioning)** - We've included a list of common screenshots for navigating the Oracle Cloud Menu. Please read this section and use the relevant absolute path images where appropriate. This will future proof your workshop in case of Oracle Cloud user interface updates.

## Folder Structure

In this example, the goal is to create several "children" workshops from one longer "parent" workshop. The children are made up of parts from the parent.

sample-workshop/
-- individual labs

provision/
setup/
dataload/
query/
introduction/
introduction.md -- description of the everything workshop, note that it is a "lab" since there is only one

workshops/
freetier/ -- freetier version of the workshop
index.html
manifest.json
livelabs/ -- livelabs version of the workshop
index.html
manifest.json


### FreeTier vs LiveLabs

* "FreeTier" - includes Free Trials, Paid Accounts, and for some workshops, Always Free accounts (brown button)
* "LiveLabs" - these are workshops that use Oracle-provided tenancies (green button)
* "Desktop" - this is a new deployment where the workshop is encapsulated in a NoVNC environment running in a compute instance

### About the Workshop

The workshop includes all 6 of the individual labs in a single sequence.

The folder structure includes an Introduction "lab" that describes the workshop as a complete set of 6 labs. Note: you may not need to have a different introduction for each of the parent and child versions of the workshops, this is illustrative only.

Look at the product-name-workshop/freetier folder and look at the manifest.json file to see the structure.

> **Note:** The use of "Lab n:" in the titles is optional

The Prerequisite "lab" is the first lab in a common folder on the oracle-livelabs/common repo. Because this lab already exists, we can use a RAW/absolute URL instead:

```
"filename": "https://oracle-livelabs.github.io/common/labs/cloud-login/cloud-login-livelabs2.md" },
```

The manifest.json file needs to know the location of each lab relative to where it exists in the hierarchy. In this structure, labs are located two levels up, for example:

```
"filename": "../../provision/provision.md"
```

### For example:

This [APEX Workshop](https://oracle-livelabs.github.io/apex/spreadsheet/workshops/freetier/) is a good example of a workshop with a single set of labs: [https://github.com/oracle-livelabs/apex/tree/main/spreadsheet](https://github.com/oracle-livelabs/apex/tree/main/spreadsheet).


2 changes: 2 additions & 0 deletions solarcar-map/introduction/files/live location.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COUNTRY,DRIVER,LATITUDE,LONGITUDE
Australia,Alex,-25.1963823,133.2011792
Loading