This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Export-TeamsList | |
| { | |
| param ( | |
| $ExportPath | |
| ) | |
| process{ | |
| Connect-PnPOnline -Scopes "Group.Read.All","User.ReadBasic.All" | |
| $accesstoken =Get-PnPAccessToken | |
| $MTeams = Invoke-RestMethod -Headers @{Authorization = "Bearer $accesstoken"} -Uri "https://graph.microsoft.com/beta/groups?`$filter=resourceProvisioningOptions/any(c:c+eq+`'Team`')" -Method Get | |
| $TeamsList = @() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| use schema ASTRA_DEMO2; | |
| select count(*) from ( | |
| select | |
| record_metadata:key:a as a, | |
| record_metadata:key:b as b | |
| from ASTRA_DEMO2.ASTRA_DEMO2.PERSISTENT___TERRAFORMSNOWFLAKEAWS_ASTRACDC_DATA_D7FFD03C_F4D3_4C5C_9E4E_704C82EC3ECF_PUPPIES_MYTABLE_PARTITION_0_447233800 natural full outer join ASTRA_DEMO2.ASTRA_DEMO2.PERSISTENT___TERRAFORMSNOWFLAKEAWS_ASTRACDC_DATA_D7FFD03C_F4D3_4C5C_9E4E_704C82EC3ECF_PUPPIES_MYTABLE_PARTITION_1_447233799 natural full outer join ASTRA_DEMO2.ASTRA_DEMO2.PERSISTENT___TERRAFORMSNOWFLAKEAWS_ASTRACDC_DATA_D7FFD03C_F4D3_4C5C_9E4E_704C82EC3ECF_PUPPIES_MYTABLE_PARTITION_2_447233798); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| insert into puppies.mytable (b , a ) VALUES ( 'test', 'hello'); | |
| insert into puppies.mytable (b , a ) VALUES ( 'test', 'there'); | |
| insert into puppies.mytable (b , a ) VALUES ( 'test', pulsar); | |
| insert into puppies.mytable (b , a ) VALUES ( 'test', snowflake); | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| create user "tf-snow" rsa_public_key='REDACTED' | |
| default_role=public must_change_password=FALSE; | |
| alter user "tf-snow" set default_warehouse = astra_demo; | |
| use role accountadmin; | |
| -- Create a Snowflake role with the privileges to work with the connector. | |
| create role kafka_connector_role_1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resources.tf | |
| ``` | |
| terraform { | |
| required_providers { | |
| snowflake = { | |
| source = "Snowflake-Labs/snowflake" | |
| version = "0.34.0" | |
| } | |
| astra = { | |
| Source = "datastax/astra" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .env: | |
| ``` | |
| export SNOWFLAKE_ACCOUNT="MHB84648" | |
| export TF_LOG="INFO" | |
| export SNOWFLAKE_USER="USERNAME" | |
| export SNOWFLAKE_PASSWORD="PASSWORD" | |
| export ASTRA_API_TOKEN="AstraCS:REDACTED" | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| terraform { | |
| required_providers { | |
| snowflake = { | |
| source = "Snowflake-Labs/snowflake" | |
| version = "0.34.0" | |
| } | |
| astra = { | |
| source = "datastax/astra" | |
| version = "2.1.0-rc9" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ls astra/ | |
| 1.cql 2.cql scb.zip | |
| $ docker run -ti -v $PWD/astra:/astra -e ASTRA_TOKEN=AstraCS:xyz:123 --rm kijanowski/docker-cqlsh-astra | |
| ... | |
| Found cql scripts; executing them... | |
| Executing /astra/1.cql | |
| ks system_schema system data_endpoint_auth ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ls astra/ | |
| scb.zip | |
| $ docker run -ti -v $PWD/astra:/astra -e ASTRA_TOKEN=AstraCS:xyz:123 --rm kijanowski/docker-cqlsh-astra | |
| ... | |
| Connected to cndb at 127.0.0.1:9042. | |
| [cqlsh 6.8.0 | Cassandra 4.0.0.6816 | CQL spec 3.4.5 | Native protocol v4] | |
| Use HELP for help. | |
| token@cqlsh> describe keyspaces | |
| ks system_schema system data_endpoint_auth ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ curl https://downloads.datastax.com/enterprise/cqlsh-astra.tar.gz -o cqlsh.tar.gz && tar zxf cqlsh.tar.gz | |
| $ sudo apt-get update && sudo apt-get install -y python3 | |
| $ /cqlsh-astra/bin/cqlsh -b /path/to/secure-connect-bundle.zip -u token -p AstraCS:xyz:123 |
NewerOlder